Skip to content

Commit

Permalink
fix:ADT-1187-[TVOS] use date format from js for player info header (#358
Browse files Browse the repository at this point in the history
)

* fix:ADT-1187-[TVOS] use date format from js for player info header

* chore: bump version
  • Loading branch information
NickWang618 authored Aug 23, 2024
1 parent a8e899b commit 4813ed3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions ios/Video/PlayerViewProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,14 @@ class PlayerViewProxy {

var rndvJSSource: RNDReactNativeDiceVideo.JSSource?
if let sourceValue = jsProps.source.value {
rndvJsProps.nowPlaying.value = RNDReactNativeDiceVideo.JSNowPlaying(
let jsNowPlaying = RNDReactNativeDiceVideo.JSNowPlaying(
title: sourceValue.nowPlaying?.title ?? jsProps.metadata.value?.title,
channelLogoUrl: sourceValue.nowPlaying?.channelLogoUrl,
episodeInfo: jsProps.metadata.value?.episodeInfo, //tvos new
startDate: sourceValue.nowPlaying?.startDate,
endDate: sourceValue.nowPlaying?.endDate)
endDate: sourceValue.nowPlaying?.endDate,
dateFormat: sourceValue.nowPlaying?.dateFormat)
rndvJsProps.nowPlaying.value = jsNowPlaying

let rndvJSIma = PlayerViewProxy.convertRNVideoImaToRNDV(sourceIma: sourceValue.ima)
let rndvJSDrm = PlayerViewProxy.convertRNVideoDrmToRNDV(sourceDrm: sourceValue.drm)
Expand All @@ -229,7 +231,6 @@ class PlayerViewProxy {
}
}
let jsLimitedSeekableRange = RNDReactNativeDiceVideo.JSLimitedSeekableRange(start: sourceValue.limitedSeekableRange?.start, end: sourceValue.limitedSeekableRange?.end, seekToStart: sourceValue.limitedSeekableRange?.seekToStart)
let jsNowPlaying = RNDReactNativeDiceVideo.JSNowPlaying(title: sourceValue.nowPlaying?.title ?? jsProps.metadata.value?.title, channelLogoUrl: sourceValue.nowPlaying?.channelLogoUrl, episodeInfo: jsProps.metadata.value?.episodeInfo, startDate: sourceValue.nowPlaying?.startDate, endDate: sourceValue.nowPlaying?.endDate)

let metadata = JSMetadata(metadata: sourceValue.metadata)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-video",
"version": "7.5.8",
"version": "7.5.9",
"dorisAndroidVersion": "3.9.32",
"description": "A <Video /> element for react-native",
"main": "Video.tsx",
Expand All @@ -20,7 +20,7 @@
"eslint-plugin-react": "3.16.1"
},
"dependencies": {
"@dicetechnology/react-native-dice-video": "git+ssh://[email protected]:DiceTechnology/react-native-dice-video.git#6.67.3",
"@dicetechnology/react-native-dice-video": "git+ssh://[email protected]:DiceTechnology/react-native-dice-video.git#6.67.7",
"@dicetechnology/dice-unity": "^2.26.3",
"keymirror": "0.1.1",
"prop-types": "^15.5.10"
Expand Down

0 comments on commit 4813ed3

Please sign in to comment.