Fix android build
This commit is contained in:
parent
56c129aa4f
commit
47151c7119
@ -533,12 +533,21 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
|
||||
builder.setSingleChoiceItems(speedOptions, selectedSpeedIndex, (dialog, which) -> {
|
||||
selectedSpeedIndex = which;
|
||||
float speed = switch (which) {
|
||||
case 0 -> 0.5f;
|
||||
case 2 -> 1.5f;
|
||||
case 3 -> 2.0f;
|
||||
default -> 1.0f;
|
||||
};
|
||||
float speed;
|
||||
switch (which) {
|
||||
case 0:
|
||||
speed = 0.5f;
|
||||
break;
|
||||
case 1:
|
||||
speed = 1.0f;
|
||||
break;
|
||||
case 2:
|
||||
speed = 1.5f;
|
||||
break;
|
||||
default:
|
||||
speed = 1.0f;
|
||||
break;
|
||||
}
|
||||
setRateModifier(speed);
|
||||
});
|
||||
builder.show();
|
||||
|
@ -6,6 +6,7 @@ import React, {
|
||||
useRef,
|
||||
type RefObject,
|
||||
} from 'react';
|
||||
//@ts-ignore
|
||||
import shaka from 'shaka-player';
|
||||
import type {VideoRef, ReactVideoProps, VideoMetadata} from './types';
|
||||
|
||||
@ -236,6 +237,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
shakaPlayerRef.current.unload()
|
||||
}
|
||||
shakaPlayerRef.current = new shaka.Player();
|
||||
//@ts-ignore
|
||||
shakaPlayerRef.current.addEventListener("error", (event) => {
|
||||
//@ts-ignore
|
||||
const shakaError = event.detail;
|
||||
|
Loading…
Reference in New Issue
Block a user