Add id prop & autoplay handling, support DASH & HLS via Shaka Player
This commit is contained in:
@@ -18,6 +18,7 @@ class RCTVideoManager extends RCTViewManager {
|
||||
return super
|
||||
.describeProps()
|
||||
.addBooleanProp("controls", this.setControls)
|
||||
.addStringProp("id", this.setId)
|
||||
.addBooleanProp("muted", this.setMuted)
|
||||
.addBooleanProp("paused", this.setPaused)
|
||||
.addNumberProp("progressUpdateInterval", this.setProgressUpdateInterval)
|
||||
@@ -28,11 +29,16 @@ class RCTVideoManager extends RCTViewManager {
|
||||
.addObjectProp("src", this.setSource)
|
||||
.addNumberProp("volume", this.setVolume)
|
||||
.addDirectEvent("onVideoEnd")
|
||||
.addDirectEvent("onVideoError")
|
||||
.addDirectEvent("onVideoLoad")
|
||||
.addDirectEvent("onVideoLoadStart")
|
||||
.addDirectEvent("onVideoProgress");
|
||||
}
|
||||
|
||||
dismissFullscreenPlayer() {
|
||||
// not currently working
|
||||
}
|
||||
|
||||
presentFullscreenPlayer() {
|
||||
// not currently working
|
||||
}
|
||||
@@ -41,6 +47,10 @@ class RCTVideoManager extends RCTViewManager {
|
||||
view.controls = value;
|
||||
}
|
||||
|
||||
setId(view: RCTVideo, value: string) {
|
||||
view.id = value;
|
||||
}
|
||||
|
||||
setMuted(view: RCTVideo, value: boolean) {
|
||||
view.muted = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user