diff --git a/docs/ad-insertion.md b/docs/ad-insertion.md index 9422bceac1..9f6e9df88b 100644 --- a/docs/ad-insertion.md +++ b/docs/ad-insertion.md @@ -220,7 +220,7 @@ server-side ad insertion `MediaSource` for URIs using the `ssai://` scheme: Player player = new ExoPlayer.Builder(context) .setMediaSourceFactory( - new DefaultMediaSourceFactory(dataSourceFactory) + new DefaultMediaSourceFactory(context) .setServerSideAdInsertionMediaSourceFactory(ssaiFactory)) .build(); ``` @@ -241,7 +241,7 @@ In order to use this class, you need to set up the ``` // MediaSource.Factory to load the actual media stream. DefaultMediaSourceFactory defaultMediaSourceFactory = - new DefaultMediaSourceFactory(dataSourceFactory); + new DefaultMediaSourceFactory(context); // AdsLoader that can be reused for multiple playbacks. ImaServerSideAdInsertionMediaSource.AdsLoader adsLoader = new ImaServerSideAdInsertionMediaSource.AdsLoader.Builder(context, adViewProvider) diff --git a/docs/drm.md b/docs/drm.md index 8994bf9d64..4a5bf7e5af 100644 --- a/docs/drm.md +++ b/docs/drm.md @@ -94,7 +94,7 @@ DrmSessionManager customDrmSessionManager = new CustomDrmSessionManager(/* ... */); // Pass a drm session manager provider to the media source factory. MediaSource.Factory mediaSourceFactory = - new DefaultMediaSourceFactory(dataSourceFactory) + new DefaultMediaSourceFactory(context) .setDrmSessionManagerProvider(mediaItem -> customDrmSessionManager); ~~~ {: .language-java}