Summary: | iOS 8 WebGL cannot pass video to texImage2d | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ashley Gullen <ashley> | ||||
Component: | WebGL | Assignee: | Alex Christensen <achristensen> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, alastair, brendan, commit-queue, dfarler, dino, doyer.guyllaume, eric.carlson, glenn, jer.noble, mail, moo_lj89, philipj, richard.getinfo, rik, sergio, simon.fraser, vincent.ogloblinsky, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | iPhone / iPad | ||||||
OS: | Other | ||||||
URL: | http://www.scirra.com/labs/bugs/webglvideo/ | ||||||
Bug Depends on: | 134199 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Ashley Gullen
2014-06-04 06:40:47 PDT
Sorry, editing fail. Last line of first paragraph should read "the video is h.264 encoded in .mp4 container and sent by the server with the MIME type video/mp4", so it should be a supported video format on iOS. Why isn't Radar picking this up? dfarler, do you know why webkit-bug-importer is not importing? In addition to this, and somewhat related: currently playback controls still appear when the video element is not added to the DOM but instead passed to canvas2d's drawImage(). For the same reasons as this report it should work without forcing fullscreen controls to appear. (In reply to comment #4) > In addition to this, and somewhat related: currently playback controls still appear when the video element is not added to the DOM but instead passed to canvas2d's drawImage(). For the same reasons as this report it should work without forcing fullscreen controls to appear. Can you explain this a bit more? You are seeing the controls render even if the video is not in the page? Where are the controls? It opens the video fullscreen as if it were playing an html5 video (making the page no longer visible), but the video is black. The video controls work and the audio plays, but I can't see if the video is being drawn to texture because the canvas is covered. On iOS a 'SecurityError: DOM Exception 18' will be thrown when trying to upload a video via texImage2d or when using it in a canvas drawImage(). In both cases the problem seems to be here in the 'wouldTaintOrigin' function: https://trac.webkit.org/browser/trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp#L70 It seems that either the 'video->hasSingleSecurityOrigin()' or the 'video->player()->didPassCORSAccessCheck()' check fails. Please fix this, iOS is the only missing platform here! That limitation is unfortunately still there in iOS 8 beta 2 (Webkit/538.39.2, Safari/9537.53). Dean, Any news about for this bug ? Could you assign it ? Klaus give us good informations for investing it. Regards The hasSingleSecurityOrigin check fails. The source of this problem is in MediaPlayerPrivateAVFoundationObjC.mm: #if PLATFORM(IOS) // FIXME: Implement for iOS in WebKit System Interface. static inline NSURL *wkAVAssetResolvedURL(AVAsset*) { return nil; } #endif Created attachment 233445 [details]
Patch
Comment on attachment 233445 [details]
Patch
r=me
Thanks for the patches! Great to see progress here! In the meantime I have made an additional simple and very reduced example for testing this case here: http://krpano.com/ios/bugs/ios8-webgl-video/ This example also shows the iPhone-only problem with the 'video fullscreen'. Comment on attachment 233445 [details] Patch Rejecting attachment 233445 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: rce/WebKit/mac/WebView/WebTextCompletionController.mm -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKitLegacy.build/Objects-normal/x86_64/WebTextCompletionController.o ** BUILD FAILED ** The following build commands failed: CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKitLegacy.build/Objects-normal/x86_64/WebSystemInterface.o mac/WebCoreSupport/WebSystemInterface.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Full output: http://webkit-queues.appspot.com/results/5835844803887104 (In reply to comment #15) > Thanks for the patches! > Great to see progress here! > > In the meantime I have made an additional simple and very reduced example for testing this case here: > > http://krpano.com/ios/bugs/ios8-webgl-video/ > > This example also shows the iPhone-only problem with the 'video fullscreen'. Please file a separate bug for any additional problems you find. This compiles fine. http://trac.webkit.org/changeset/170295 Re-opened since this is blocked by bug 134199 Possibly related: video playback in canvas2d drawImage() is also buggy. See https://bugs.webkit.org/show_bug.cgi?id=134251 This is marked "resolved fixed", but is only partially fixed in iOS 8 beta 3: the unwanted fullscreen playback controls still appear. They can however be exited and the cube displays correctly, albeit with poor performance on an iPhone 4S (looks like 3-4 FPS). As the original comment noted, the fullscreen playback controls are likely unsuitable for most use cases of playing video in WebGL. Also, surely the performance can be improved? That bug is only partially fixed, when using cross-domain (CORS) videos, this still fails. Here the new bug report: https://bugs.webkit.org/show_bug.cgi?id=135379 and here a test case: http://krpano.com/ios/bugs/ios8-webgl-video-cors/ (In reply to comment #23) > That bug is only partially fixed, when using cross-domain (CORS) videos, > this still fails. > > Here the new bug report: > https://bugs.webkit.org/show_bug.cgi?id=135379 > > and here a test case: > http://krpano.com/ios/bugs/ios8-webgl-video-cors/ Hi~~How do you solve this problem. In iOS 9.0.2 (13A452) video textures works but video does not play using this demo. I get the first frame but repeated attempts to play() after touch event will not trigger video playback. Am I missing something new? (In reply to comment #25) > In iOS 9.0.2 (13A452) video textures works but video does not play using > this demo. I get the first frame but repeated attempts to play() after > touch event will not trigger video playback. Am I missing something new? OK. Caught again by the iOS click-to-play "feature". Problem solved. |