[AIR iOS] Webview video and sounds

Subscribe to [AIR iOS] Webview video and sounds 5 posts

avatar for Draco18s Draco18s 6879 posts
Flag Post

When playing a video (mp4) via a webview, the video seems to take priority with sound and will prevent other sounds from playing even after the video is stopped and removed from the fake display list.1

This is so bad as that occasionally the video will continue playing in the background after the webview has been disposed of.

Does anybody know what I can do to either a) prevent the video from stealing all the audio channels or b) make it give them back when the user is done with the video.

Here’s the order of operations that cause “muted sound”:

Go into the game (sounds play just fine).
Exit the game.
Go into the video.
Exit video.
Go into the game (sounds are muted).

The video has to be entered after the game has had a chance to play it’s sounds at least once, and only then will the game be “muted.”

1 Webviews aren’t part of the display list, technically.

 
avatar for Solanix Solanix 91 posts
Flag Post

You wouldn’t, by any chance, be using a version older than AIR 3.0?

 
avatar for Draco18s Draco18s 6879 posts
Flag Post
Originally posted by Solanix:

You wouldn’t, by any chance, be using a version older than AIR 3.0?

I have options of AIR 2.5, 2.6, AIR for iOS (no version) and AIR for Android (no version).

 
avatar for Solanix Solanix 91 posts
Flag Post

I guess you’re out of luck if you can’t upgrade then. You could try using drawViewPortToBitmapData() instead of adding it to the stage, but I don’t think there’s any way to pull the audio out. You could check if webview happens to be using something like SampleDataEvent in the back for its audio that you could catch, but I doubt it.

 
avatar for Draco18s Draco18s 6879 posts
Flag Post
Originally posted by Solanix:

I guess you’re out of luck if you can’t upgrade then. You could try using drawViewPortToBitmapData() instead of adding it to the stage, but I don’t think there’s any way to pull the audio out. You could check if webview happens to be using something like SampleDataEvent in the back for its audio that you could catch, but I doubt it.

Webviews are not part of the display list >..>

It also doesn’t dispatch events or have any properties or methods that are useful to do anything.