Android Mediaplayer Error and crash after playing four videos with Pre-roll

140 views
Skip to first unread message

Mary Jane Zorick

unread,
Jan 20, 2015, 2:56:55 PM1/20/15
to ima...@googlegroups.com

Android Brightcove SDK 4.3.1, IMA Plugin 4.3.1 and IMA beta9.jar (Ad Rules)

Can provide ad tag if needed

We’re running into an unknown media player error after playing four videos -- exiting out of each one and then playing a new video. Doing this four times, then on the fifth video the player errors and hangs. Each time a pre-roll is played. No other videos will play at this point until clearing data and restarting app. At the point of error we’re able to handle the SourceNotPlayable event but cannot recover from the state.  Continuous play (which only runs one pre-roll at beginning of segment) does not run into the same errors.

Having a hard time deciphering the logs at this point (event logging enabled). Logs attached. Any help is appreciated. Thanks!

FireTV-logs.rtf

Bret McGowen

unread,
Jan 21, 2015, 2:55:02 PM1/21/15
to ima...@googlegroups.com
Hi Mary Jane,

A few of questions:
1 - are you only experiencing this issue on FireTV, or do you see it on other Android devices or emulators?
2 - Can you post the IMA-related code you run when switching videos (AdsManager, AdsLoader etc interactions)
3 - If you could provide the ad tag, that'd be great. You can private message me the ad tag URL if you don't want to post it publicly.

Cheers,
Bret McGowen
IMA SDK Team

Mary Jane Zorick

unread,
Jan 21, 2015, 5:25:32 PM1/21/15
to ima...@googlegroups.com
I ran the app on two phones (API 20) and after 4 videos was seeing some issues -- the video progress, but the Ad background is still visible so we're unable to see the actual video, or just seeing a black screen.

I'll private message you the ad tag and the Activity code with the IMA-related code.

Thanks Bret! 

Mary Jane Zorick

unread,
Jan 21, 2015, 7:32:19 PM1/21/15
to ima...@googlegroups.com
Bret - we have a solution to this. It appears that the mediaplayer isn't being released before the surface is destroyed. We set the property "

releaseWhenSurfaceDestroyed" to true on the System -- System.setProperty("releaseWhenSurfaceDestroyed", "true") -- and are no longer seeing the issue. 

Much thanks.


On Tuesday, January 20, 2015 at 11:56:55 AM UTC-8, Mary Jane Zorick wrote:

Bret McGowen

unread,
Jan 22, 2015, 5:19:59 PM1/22/15
to ima...@googlegroups.com
Hi Mary Jane,

Glad y'all got it sorted out! I'm not familiar with the API or property releaseWhenSurfaceDestroyed -- is that a Brightcove player property?

Mary Jane Zorick

unread,
Jan 26, 2015, 11:51:12 AM1/26/15
to ima...@googlegroups.com
yes, it's a Brightcove-specific property but it's not documented.  I asked BC support and they stated that it was used as a workaround in an older sdk version but that it's not considered an ideal practice to use it. 

MJ

Bret McGowen

unread,
Jan 26, 2015, 2:47:59 PM1/26/15
to ima...@googlegroups.com
Hey Mary Jane,

Gotcha, thanks for the additional info!

Cheers,
Bret McGowen
IMA SDK Team
Reply all
Reply to author
Forward
0 new messages