Bug 114771 - Youtube iframe api causes Safari 5.1.7+ Mac to hang up
Summary: Youtube iframe api causes Safari 5.1.7+ Mac to hang up
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.8
: P2 Blocker
Assignee: Nobody
URL: http://tstlab.virtualcreations.de/you...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-17 15:23 PDT by Jurek R.
Modified: 2023-10-30 09:41 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jurek R. 2013-04-17 15:23:04 PDT
I add a fullscreen youtube iframe on a webpage using the following options:

ytplayer = new YT.Player('ytplayer', {
height: '390',width: '640',
videoId: $('.parameter[title|="youtube"]', block).text(),
playerVars: {
  'hd':1,'autoplay': 0, 'controls': 0, 
  'modestbranding': 1,'rel':0,'showinfo': 0,'loop': 1, 'iv_load_policy': 3,
  'enablejsapi': 0,'html5': 1,'scrolling': 'no'
},
events: {
  'onReady': pCmsBackground.ytOnPlayerReady,
  'onStateChange': pCmsBackground.ytOnPlayerStateChange
}

I use the following css on iframe div container:

position: fixed;
width: 100%;
height: 100%;
left: 0px;
top: 0px;
-webkit-user-drag: none;
-moz-user-drag: none;
-ms-user-drag: none;
user-drag: none;
pointer-events: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;

Now if ytOnPlayerReady is fired, I start to play the video, and on ytOnPlayerStateChange and event.data == YT.PlayerState.PLAYING I stop the video, until the moment comes when the video should be faded in and started.

This works fine on all browsers (Safari 5.05, IE9, Chrome, Firefox), but NOT on Safari 5.17 or Safari 5.19!

On Safari 5.17/5.19 as soon as the video is playing in ytOnPlayerReady, the browser starts extremely to lag, taking 100% of cpu. Also the fade in of the video never is visible, but the video starts to play in background, sound is stuttering.

The problem does not appear in the recent 5.17 webkit. So what is the problem here? It seems to be a bug in Safari. But I have to clue what bug it is and if there is a workaround for it.

Safari 5.1.7/5.1.9 is quite important to support, because on OSX 10.6.8 which is still used on 40% of Macs, this version is the newest one.

Please help, thanks!
Comment 1 Jurek R. 2013-04-17 15:25:13 PDT
With "recent 5.17 webkit" I mean the last webkit build for snow leopard, r127852.
Comment 2 Jurek R. 2013-05-02 13:15:37 PDT
Here is an example that nearly freezes Safari:

http://tstlab.virtualcreations.de/youtube-html5-bug.html


It only happens if  Safari version > 5.03 and youtube iframe is html5=1. It works on all other browsers, including chrome, Safari < 5.04.

Please fix it!
Comment 3 Jurek R. 2013-05-23 06:26:45 PDT
Confirmed by some other Mac users, too. Until now I cannot see a pattern in the occuring of the bug.

Some users do not see the bug, some users see it. Read here for test results (German): 
http://www.mactechnews.de/forum/discussion/Schwerer-Video-Bug-in-Safari-5-05-Bitte-um-Bestaetigung-313438.html


Confirmed on:
- Safari 5.1.7 - 5.1.9, OSX 10.6.8, MacPro 3,1, ATI HD 5570
- Safari 6.0.4, OSX 10.8.3, MacBook Pro 3,1 (mid 2007) mit einer nVidia 8600M GT
- Safari 5.0.6, OSX 10.5.8 PPC

Maybe it's related to older Graphics drivers within OSX? But it happens on nVidia and also on ATI.

Please test it and fix it!
Comment 4 Jurek R. 2013-06-18 14:09:55 PDT
Also happens with youtube html5:

http://www.youtube.com/html5?hl=de&gl=DE
Comment 5 Karl Dubost 2023-10-30 09:41:37 PDT
Not relevant anymore.
It doesn't reproduce.