I’m experiencing a similar problem.
I have taken a cue from the above and added a button that initiates playback in response to user touch input.
Using the PlayingVideo sample, compiling to html5, I can see the video playback on iOS browsers but not on Android devices. I have tired both Chrome and Firefox on android, and in Chrome and Firefox both the video shows up as a black surface (see error below). Additionally, there is audio playback in Firefox for Android. The OS and Browsers in question are all current.
Using firefox’s webIDE I see the following errors (repeated many times) in the console:
Error: WebGL warning: drawArrays: Active texture 0 for target 0x0de1 is 'incomplete', and will be rendered as RGBA(0,0,0,1), as per the GLES 2.0.24 $3.8.2: The dimensions of `level_base` are not all positive. PlayingVideo.js:49368:3
Error: WebGL warning: texImage2D: GetAsSourceSurface or GetDataSurface failed after blit failed for TexUnpackImage. PlayingVideo.js:8615:1234
That at least explains the black box. But why would this condition be raised?
Also, if I try the -Dcanvas
option I see the following error:
NS_ERROR_NOT_AVAILABLE
With the -Ddom
option I can get playback on Firefox but not on Chrome (again, for android). ( Oh also, I have tested simply playing the video on all browsers, so its not a codec thing).
Any hints?
(Edit, Update. For the case of firefox, it seems to be this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1395497 which is fixed and slated for the Firefox 59 release. But what about chrome…?)
(Edit 2. Using the chrome tools I see that, even though I am initiating the call the netStream.play
inside an event handler, chrome on android is throwing this error:
PlayingVideo.js:68386 Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.
I am listening for a MouseEvent.MOUSE_DOWN
event and calling netStream.play("assets/example.mp4")
within its handler. Still no joy.)