diff --git a/src/services/trailerService.ts b/src/services/trailerService.ts index 5044a93b4..2cff19d3b 100644 --- a/src/services/trailerService.ts +++ b/src/services/trailerService.ts @@ -1,4 +1,5 @@ import { logger } from '../utils/logger'; +import { Platform } from 'react-native'; import { YouTubeExtractor } from './youtubeExtractor'; export interface TrailerData { @@ -41,7 +42,8 @@ export class TrailerService { } try { - const url = await YouTubeExtractor.getBestStreamUrl(youtubeVideoId); + const platform = Platform.OS === 'android' ? 'android' : 'ios'; + const url = await YouTubeExtractor.getBestStreamUrl(youtubeVideoId, platform); if (url) { logger.info('TrailerService', `On-device extraction succeeded for ${youtubeVideoId}`); this.setCache(youtubeVideoId, url);