mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-05-23 07:06:29 +00:00
style: normalize quotes to single in non-web files
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import { Platform } from "react-native";
|
||||
import { NitroModules } from "react-native-nitro-modules";
|
||||
import type { VideoPlayer as VideoPlayerImpl } from "../spec/nitro/VideoPlayer.nitro";
|
||||
import type { VideoPlayerSource } from "../spec/nitro/VideoPlayerSource.nitro";
|
||||
import type { IgnoreSilentSwitchMode } from "./types/IgnoreSilentSwitchMode";
|
||||
import type { MixAudioMode } from "./types/MixAudioMode";
|
||||
import type { TextTrack } from "./types/TextTrack";
|
||||
import type { NoAutocomplete } from "./types/Utils";
|
||||
import type { VideoConfig, VideoSource } from "./types/VideoConfig";
|
||||
import { Platform } from 'react-native';
|
||||
import { NitroModules } from 'react-native-nitro-modules';
|
||||
import type { VideoPlayer as VideoPlayerImpl } from '../spec/nitro/VideoPlayer.nitro';
|
||||
import type { VideoPlayerSource } from '../spec/nitro/VideoPlayerSource.nitro';
|
||||
import type { IgnoreSilentSwitchMode } from './types/IgnoreSilentSwitchMode';
|
||||
import type { MixAudioMode } from './types/MixAudioMode';
|
||||
import type { TextTrack } from './types/TextTrack';
|
||||
import type { NoAutocomplete } from './types/Utils';
|
||||
import type { VideoConfig, VideoSource } from './types/VideoConfig';
|
||||
import {
|
||||
tryParseNativeVideoError,
|
||||
VideoRuntimeError,
|
||||
} from "./types/VideoError";
|
||||
import type { VideoPlayerBase } from "./types/VideoPlayerBase";
|
||||
import type { VideoPlayerStatus } from "./types/VideoPlayerStatus";
|
||||
import { createPlayer } from "./utils/playerFactory";
|
||||
import { createSource } from "./utils/sourceFactory";
|
||||
import { VideoPlayerEvents } from "./events/VideoPlayerEvents";
|
||||
} from './types/VideoError';
|
||||
import type { VideoPlayerBase } from './types/VideoPlayerBase';
|
||||
import type { VideoPlayerStatus } from './types/VideoPlayerStatus';
|
||||
import { createPlayer } from './utils/playerFactory';
|
||||
import { createSource } from './utils/sourceFactory';
|
||||
import { VideoPlayerEvents } from './events/VideoPlayerEvents';
|
||||
|
||||
class VideoPlayer extends VideoPlayerEvents implements VideoPlayerBase {
|
||||
private _player: VideoPlayerImpl | undefined;
|
||||
@@ -196,9 +196,9 @@ class VideoPlayer extends VideoPlayerEvents implements VideoPlayerBase {
|
||||
}
|
||||
|
||||
set ignoreSilentSwitchMode(value: IgnoreSilentSwitchMode) {
|
||||
if (__DEV__ && !["ios"].includes(Platform.OS)) {
|
||||
if (__DEV__ && !['ios'].includes(Platform.OS)) {
|
||||
console.warn(
|
||||
"ignoreSilentSwitchMode is not supported on this platform, it wont have any effect",
|
||||
'ignoreSilentSwitchMode is not supported on this platform, it wont have any effect'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -291,18 +291,14 @@ class VideoPlayer extends VideoPlayerEvents implements VideoPlayerBase {
|
||||
}
|
||||
|
||||
async replaceSourceAsync(
|
||||
source:
|
||||
| VideoSource
|
||||
| VideoConfig
|
||||
| NoAutocomplete<VideoPlayerSource>
|
||||
| null,
|
||||
source: VideoSource | VideoConfig | NoAutocomplete<VideoPlayerSource> | null
|
||||
): Promise<void> {
|
||||
this.updateMemorySize();
|
||||
|
||||
await this.wrapPromise(
|
||||
this.player.replaceSourceAsync(
|
||||
source === null ? null : createSource(source),
|
||||
),
|
||||
source === null ? null : createSource(source)
|
||||
)
|
||||
);
|
||||
|
||||
this.updateMemorySize();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AllPlayerEvents as PlayerEvents } from "../types/Events";
|
||||
import type { ListenerSubscription } from "../types/EventEmitter";
|
||||
import { VideoPlayerEventsBase } from "./VideoPlayerEventsBase";
|
||||
import type { AllPlayerEvents as PlayerEvents } from '../types/Events';
|
||||
import type { ListenerSubscription } from '../types/EventEmitter';
|
||||
import { VideoPlayerEventsBase } from './VideoPlayerEventsBase';
|
||||
|
||||
export class VideoPlayerEvents extends VideoPlayerEventsBase {
|
||||
addEventListener<Event extends keyof PlayerEvents>(
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Platform-specific versions: VideoPlayerEvents.native.ts, VideoPlayerEvents.web.ts
|
||||
// This file is the default fallback for TypeScript resolution.
|
||||
export { VideoPlayerEvents } from "./VideoPlayerEvents.native";
|
||||
export { VideoPlayerEvents } from './VideoPlayerEvents.native';
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
ALL_PLAYER_EVENTS,
|
||||
type JSVideoPlayerEvents,
|
||||
type AllPlayerEvents as PlayerEvents,
|
||||
} from "../types/Events";
|
||||
} from '../types/Events';
|
||||
import type {
|
||||
ListenerSubscription,
|
||||
VideoPlayerEventEmitterBase,
|
||||
} from "../types/EventEmitter";
|
||||
} from '../types/EventEmitter';
|
||||
|
||||
export class VideoPlayerEventsBase {
|
||||
protected eventEmitter: VideoPlayerEventEmitterBase;
|
||||
|
||||
@@ -6,9 +6,9 @@ import type {
|
||||
onProgressData,
|
||||
onVolumeChangeData,
|
||||
TimedMetadata,
|
||||
} from "./Events";
|
||||
import type { TextTrack } from "./TextTrack";
|
||||
import type { VideoPlayerStatus } from "./VideoPlayerStatus";
|
||||
} from './Events';
|
||||
import type { TextTrack } from './TextTrack';
|
||||
import type { VideoPlayerStatus } from './VideoPlayerStatus';
|
||||
|
||||
/**
|
||||
* A subscription that can be used to remove a listener.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { VideoPlayerSource } from "../../spec/nitro/VideoPlayerSource.nitro";
|
||||
import type { VideoPlayerSource } from '../../spec/nitro/VideoPlayerSource.nitro';
|
||||
|
||||
export const isVideoPlayerSource = (obj: any): obj is VideoPlayerSource => {
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { ViewProps, ViewStyle } from "react-native";
|
||||
import type { SurfaceType } from "../../spec/nitro/VideoViewViewManager.nitro";
|
||||
import type { ListenerSubscription } from "../types/EventEmitter";
|
||||
import type { VideoViewEvents } from "../types/Events";
|
||||
import type { ResizeMode } from "../types/ResizeMode";
|
||||
import type { VideoPlayer } from "../VideoPlayer";
|
||||
import type { ViewProps, ViewStyle } from 'react-native';
|
||||
import type { SurfaceType } from '../../spec/nitro/VideoViewViewManager.nitro';
|
||||
import type { ListenerSubscription } from '../types/EventEmitter';
|
||||
import type { VideoViewEvents } from '../types/Events';
|
||||
import type { ResizeMode } from '../types/ResizeMode';
|
||||
import type { VideoPlayer } from '../VideoPlayer';
|
||||
|
||||
export interface VideoViewProps extends Partial<VideoViewEvents>, ViewProps {
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
export { useEvent } from "./core/hooks/useEvent";
|
||||
export { useVideoPlayer } from "./core/hooks/useVideoPlayer";
|
||||
export type * from "./core/types/Events";
|
||||
export type { IgnoreSilentSwitchMode } from "./core/types/IgnoreSilentSwitchMode";
|
||||
export type { MixAudioMode } from "./core/types/MixAudioMode";
|
||||
export type { ResizeMode } from "./core/types/ResizeMode";
|
||||
export type { TextTrack } from "./core/types/TextTrack";
|
||||
export type { VideoConfig, VideoSource } from "./core/types/VideoConfig";
|
||||
export { useEvent } from './core/hooks/useEvent';
|
||||
export { useVideoPlayer } from './core/hooks/useVideoPlayer';
|
||||
export type * from './core/types/Events';
|
||||
export type { IgnoreSilentSwitchMode } from './core/types/IgnoreSilentSwitchMode';
|
||||
export type { MixAudioMode } from './core/types/MixAudioMode';
|
||||
export type { ResizeMode } from './core/types/ResizeMode';
|
||||
export type { TextTrack } from './core/types/TextTrack';
|
||||
export type { VideoConfig, VideoSource } from './core/types/VideoConfig';
|
||||
export type {
|
||||
LibraryError,
|
||||
PlayerError,
|
||||
@@ -16,12 +16,12 @@ export type {
|
||||
VideoErrorCode,
|
||||
VideoRuntimeError,
|
||||
VideoViewError,
|
||||
} from "./core/types/VideoError";
|
||||
export type { VideoPlayerStatus } from "./core/types/VideoPlayerStatus";
|
||||
} from './core/types/VideoError';
|
||||
export type { VideoPlayerStatus } from './core/types/VideoPlayerStatus';
|
||||
|
||||
export { VideoPlayer } from "./core/VideoPlayer";
|
||||
export { default as VideoView } from "./core/video-view/VideoView";
|
||||
export { VideoPlayer } from './core/VideoPlayer';
|
||||
export { default as VideoView } from './core/video-view/VideoView';
|
||||
export type {
|
||||
VideoViewProps,
|
||||
VideoViewRef,
|
||||
} from "./core/video-view/VideoViewProps";
|
||||
} from './core/video-view/VideoViewProps';
|
||||
|
||||
Reference in New Issue
Block a user