Fix runtime issues
This commit is contained in:
parent
bd1f7f50cb
commit
edd3cc1698
@ -537,13 +537,13 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
@Override
|
@Override
|
||||||
public void run () {
|
public void run () {
|
||||||
// Source initialization must run on the main thread
|
// Source initialization must run on the main thread
|
||||||
initializePlayerSource(self, drmSessionManager);
|
initializePlayerSource(self, drmSessionManager, srcUri);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
initializePlayerSource(self, null);
|
initializePlayerSource(self, null, srcUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -613,9 +613,9 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
return drmSessionManager;
|
return drmSessionManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializePlayerSource(ReactExoplayerView self, DrmSessionManager drmSessionManager) {
|
private void initializePlayerSource(ReactExoplayerView self, DrmSessionManager drmSessionManager, Uri srcUri) {
|
||||||
ArrayList<MediaSource> mediaSourceList = buildTextSources();
|
ArrayList<MediaSource> mediaSourceList = buildTextSources();
|
||||||
MediaSource videoSource = self.buildMediaSource(self.srcUri, self.extension, drmSessionManager);
|
MediaSource videoSource = self.buildMediaSource(srcUri, self.extension, drmSessionManager);
|
||||||
MediaSource mediaSource;
|
MediaSource mediaSource;
|
||||||
if (mediaSourceList.size() == 0) {
|
if (mediaSourceList.size() == 0) {
|
||||||
mediaSource = videoSource;
|
mediaSource = videoSource;
|
||||||
|
Loading…
Reference in New Issue
Block a user