Baseflow / ExoPlayerXamarin

Xamarin bindings library for the Google ExoPlayer library

Home Page:https://baseflow.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] How to use SsMediaSource

mc0re opened this issue · comments

Do you have some sample code on how to use SsMediaSource? I crafted this piece, but it does not start the playback.

            var httpDataSourceFactory = new DefaultHttpDataSourceFactory("1");
            var ssChunkFactory = new DefaultSsChunkSource.Factory(httpDataSourceFactory);
            var ssMediaSource = new SsMediaSource.Factory(ssChunkFactory, httpDataSourceFactory)
                .SetDrmSessionManager(this)
                .CreateMediaSource(sourceUri);
            
            mPlayer.Prepare(ssMediaSource);

It doesn't even call IDrmSessionManager.AcquireSession, only IDrmSessionManager.Prepare, which is an empty method. I'd love to use some default DRM manager, but couldn't find any, therefore tried to implement my own (to avoid an exception of calling an abstract method prepare).

sourceUri is "http://amssamples.streaming.mediaservices.windows.net/683f7e47-bd83-4427-b0a3-26a6c4547782/BigBuckBunny.ism/manifest".

Did you create an example? Can you post a link?