|
|
|
@ -15,7 +15,9 @@ import {
@@ -15,7 +15,9 @@ import {
|
|
|
|
|
canChangeVolume, |
|
|
|
|
canFullscreen, |
|
|
|
|
canFullscreenAnyElement, |
|
|
|
|
canPictureInPicture, |
|
|
|
|
canWebkitFullscreen, |
|
|
|
|
canWebkitPictureInPicture, |
|
|
|
|
} from "@/utils/detectFeatures"; |
|
|
|
|
import { makeEmitter } from "@/utils/events"; |
|
|
|
|
|
|
|
|
@ -42,14 +44,6 @@ function hlsLevelsToQualities(levels: Level[]): SourceQuality[] {
@@ -42,14 +44,6 @@ function hlsLevelsToQualities(levels: Level[]): SourceQuality[] {
|
|
|
|
|
.filter((v): v is SourceQuality => !!v); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function canWebkitPictureInPicture(): boolean { |
|
|
|
|
return "webkitSupportsPresentationMode" in document.createElement("video"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function canPictureInPicture(): boolean { |
|
|
|
|
return "pictureInPictureEnabled" in document; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function makeVideoElementDisplayInterface(): DisplayInterface { |
|
|
|
|
const { emit, on, off } = makeEmitter<DisplayInterfaceEvents>(); |
|
|
|
|
let source: LoadableSource | null = null; |
|
|
|
|