chaimPaneth / react-native-jw-media-player

React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
MIT License
196 stars 92 forks source link

The seek to 15 seconds buttons in a notification player #286

Closed fvasyliukApiko closed 1 year ago

fvasyliukApiko commented 1 year ago

Hello! Thank you for the wonderful project!

Could you please help with the seek to 15 seconds button in the notification player? After forwarding on 15s. can't do more 15 seconds forward.

https://user-images.githubusercontent.com/56924169/224564725-c0340bd1-d098-4599-910b-96bff577c458.mp4

chaimPaneth commented 1 year ago

Hi @fvasyliukApiko

Do you get any errors in xcode also can you log that an onSeek event fired?

Thanks

fvasyliukApiko commented 1 year ago

@chaimPaneth Don't sure it's helpful : image .This is onSeek event: {"_dispatchInstances": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.5719165802001953, "actualStartTime": 4802189461.109166, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Function JWPlayer], "flags": 513, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function PlayerModel@29.setRefPlayer], "return": [FiberNode], "selfBaseDuration": 0.19495868682861328, "sibling": null, "stateNode": [JWPlayer], "subtreeFlags": 512, "tag": 1, "treeBaseDuration": 0.20037460327148438, "type": [Function JWPlayer], "updateQueue": [Object]}, "_debugSource": undefined, "actualDuration": 0.37479114532470703, "actualStartTime": 4802189461.305, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RNJWPlayerView", "flags": 512, "index": 0, "key": "RNJWPlayerKey-0", "lanes": 0, "memoizedProps": {"config": [Object], "controls": false, "onBeforePlay": [Function anonymous], "onComplete": [Function anonymous], "onPause": [Function anonymous], "onPlay": [Function anonymous], "onPlayerError": [Function anonymous], "onPlayerReady": [Function anonymous], "onPlaylistItem": [Function anonymous], "onSeek": [Function anonymous], "onSetupPlayerError": [Function anonymous], "onTime": [Function anonymous], "style": [Object]}, "memoizedState": null, "mode": 2, "pendingProps": {"config": [Object], "controls": false, "onBeforePlay": [Function anonymous], "onComplete": [Function anonymous], "onPause": [Function anonymous], "onPlay": [Function anonymous], "onPlayerError": [Function anonymous], "onPlayerReady": [Function anonymous], "onPlaylistItem": [Function anonymous], "onSeek": [Function anonymous], "onSetupPlayerError": [Function anonymous], "onTime": [Function anonymous], "style": [Object]}, "ref": [Function ref], "return": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.5719165802001953, "actualStartTime": 4802189461.109166, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Function JWPlayer], "flags": 513, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function PlayerModel@29.setRefPlayer], "return": [FiberNode], "selfBaseDuration": 0.19495868682861328, "sibling": null, "stateNode": [JWPlayer], "subtreeFlags": 512, "tag": 1, "treeBaseDuration": 0.20037460327148438, "type": [Function JWPlayer], "updateQueue": [Object]}, "selfBaseDuration": 0.005415916442871094, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 99, "viewConfig": [Object]}, "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.005415916442871094, "type": "RNJWPlayerView", "updateQueue": null}, "_dispatchListeners": [Function anonymous], "_targetInst": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.5719165802001953, "actualStartTime": 4802189461.109166, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Function JWPlayer], "flags": 513, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function PlayerModel@29.setRefPlayer], "return": [FiberNode], "selfBaseDuration": 0.19495868682861328, "sibling": null, "stateNode": [JWPlayer], "subtreeFlags": 512, "tag": 1, "treeBaseDuration": 0.20037460327148438, "type": [Function JWPlayer], "updateQueue": [Object]}, "_debugSource": undefined, "actualDuration": 0.37479114532470703, "actualStartTime": 4802189461.305, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RNJWPlayerView", "flags": 512, "index": 0, "key": "RNJWPlayerKey-0", "lanes": 0, "memoizedProps": {"config": [Object], "controls": false, "onBeforePlay": [Function anonymous], "onComplete": [Function anonymous], "onPause": [Function anonymous], "onPlay": [Function anonymous], "onPlayerError": [Function anonymous], "onPlayerReady": [Function anonymous], "onPlaylistItem": [Function anonymous], "onSeek": [Function anonymous], "onSetupPlayerError": [Function anonymous], "onTime": [Function anonymous], "style": [Object]}, "memoizedState": null, "mode": 2, "pendingProps": {"config": [Object], "controls": false, "onBeforePlay": [Function anonymous], "onComplete": [Function anonymous], "onPause": [Function anonymous], "onPlay": [Function anonymous], "onPlayerError": [Function anonymous], "onPlayerReady": [Function anonymous], "onPlaylistItem": [Function anonymous], "onSeek": [Function anonymous], "onSetupPlayerError": [Function anonymous], "onTime": [Function anonymous], "style": [Object]}, "ref": [Function ref], "return": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.5719165802001953, "actualStartTime": 4802189461.109166, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Function JWPlayer], "flags": 513, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function PlayerModel@29.setRefPlayer], "return": [FiberNode], "selfBaseDuration": 0.19495868682861328, "sibling": null, "stateNode": [JWPlayer], "subtreeFlags": 512, "tag": 1, "treeBaseDuration": 0.20037460327148438, "type": [Function JWPlayer], "updateQueue": [Object]}, "selfBaseDuration": 0.005415916442871094, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 99, "viewConfig": [Object]}, "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.005415916442871094, "type": "RNJWPlayerView", "updateQueue": null}, "bubbles": undefined, "cancelable": undefined, "currentTarget": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.37479114532470703, "actualStartTime": 4802189461.305, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RNJWPlayerView", "flags": 512, "index": 0, "key": "RNJWPlayerKey-0", "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function ref], "return": [FiberNode], "selfBaseDuration": 0.005415916442871094, "sibling": null, "stateNode": [Circular], "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.005415916442871094, "type": "RNJWPlayerView", "updateQueue": null}, "_nativeTag": 99, "viewConfig": {"Commands": [Object], "Constants": [Object], "Manager": "RNJWPlayerViewManager", "NativeProps": [Object], "baseModuleName": "RCTView", "bubblingEventTypes": [Object], "directEventTypes": [Object], "uiViewClassName": "RNJWPlayerView", "validAttributes": [Object]}}, "defaultPrevented": undefined, "dispatchConfig": {"phasedRegistrationNames": {"bubbled": "onSeek", "captured": "onSeekCapture"}}, "eventPhase": undefined, "isDefaultPrevented": [Function functionThatReturnsFalse], "isPropagationStopped": [Function functionThatReturnsFalse], "isTrusted": undefined, "nativeEvent": {"from": 1.901086092, "target": 99, "to": 15}, "target": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.37479114532470703, "actualStartTime": 4802189461.305, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RNJWPlayerView", "flags": 512, "index": 0, "key": "RNJWPlayerKey-0", "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function ref], "return": [FiberNode], "selfBaseDuration": 0.005415916442871094, "sibling": null, "stateNode": [Circular], "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.005415916442871094, "type": "RNJWPlayerView", "updateQueue": null}, "_nativeTag": 99, "viewConfig": {"Commands": [Object], "Constants": [Object], "Manager": "RNJWPlayerViewManager", "NativeProps": [Object], "baseModuleName": "RCTView", "bubblingEventTypes": [Object], "directEventTypes": [Object], "uiViewClassName": "RNJWPlayerView", "validAttributes": [Object]}}, "timeStamp": 1678982335482, "type": undefined} LOG onSeek {"_dispatchInstances": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.5719165802001953, "actualStartTime": 4802189461.109166, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Function JWPlayer], "flags": 513, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function PlayerModel@29.setRefPlayer], "return": [FiberNode], "selfBaseDuration": 0.19495868682861328, "sibling": null, "stateNode": [JWPlayer], "subtreeFlags": 512, "tag": 1, "treeBaseDuration": 0.20037460327148438, "type": [Function JWPlayer], "updateQueue": [Object]}, "_debugSource": undefined, "actualDuration": 0.37479114532470703, "actualStartTime": 4802189461.305, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RNJWPlayerView", "flags": 512, "index": 0, "key": "RNJWPlayerKey-0", "lanes": 0, "memoizedProps": {"config": [Object], "controls": false, "onBeforePlay": [Function anonymous], "onComplete": [Function anonymous], "onPause": [Function anonymous], "onPlay": [Function anonymous], "onPlayerError": [Function anonymous], "onPlayerReady": [Function anonymous], "onPlaylistItem": [Function anonymous], "onSeek": [Function anonymous], "onSetupPlayerError": [Function anonymous], "onTime": [Function anonymous], "style": [Object]}, "memoizedState": null, "mode": 2, "pendingProps": {"config": [Object], "controls": false, "onBeforePlay": [Function anonymous], "onComplete": [Function anonymous], "onPause": [Function anonymous], "onPlay": [Function anonymous], "onPlayerError": [Function anonymous], "onPlayerReady": [Function anonymous], "onPlaylistItem": [Function anonymous], "onSeek": [Function anonymous], "onSetupPlayerError": [Function anonymous], "onTime": [Function anonymous], "style": [Object]}, "ref": [Function ref], "return": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.5719165802001953, "actualStartTime": 4802189461.109166, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Function JWPlayer], "flags": 513, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function PlayerModel@29.setRefPlayer], "return": [FiberNode], "selfBaseDuration": 0.19495868682861328, "sibling": null, "stateNode": [JWPlayer], "subtreeFlags": 512, "tag": 1, "treeBaseDuration": 0.20037460327148438, "type": [Function JWPlayer], "updateQueue": [Object]}, "selfBaseDuration": 0.005415916442871094, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 99, "viewConfig": [Object]}, "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.005415916442871094, "type": "RNJWPlayerView", "updateQueue": null}, "_dispatchListeners": [Function anonymous], "_targetInst": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.5719165802001953, "actualStartTime": 4802189461.109166, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Function JWPlayer], "flags": 513, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function PlayerModel@29.setRefPlayer], "return": [FiberNode], "selfBaseDuration": 0.19495868682861328, "sibling": null, "stateNode": [JWPlayer], "subtreeFlags": 512, "tag": 1, "treeBaseDuration": 0.20037460327148438, "type": [Function JWPlayer], "updateQueue": [Object]}, "_debugSource": undefined, "actualDuration": 0.37479114532470703, "actualStartTime": 4802189461.305, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RNJWPlayerView", "flags": 512, "index": 0, "key": "RNJWPlayerKey-0", "lanes": 0, "memoizedProps": {"config": [Object], "controls": false, "onBeforePlay": [Function anonymous], "onComplete": [Function anonymous], "onPause": [Function anonymous], "onPlay": [Function anonymous], "onPlayerError": [Function anonymous], "onPlayerReady": [Function anonymous], "onPlaylistItem": [Function anonymous], "onSeek": [Function anonymous], "onSetupPlayerError": [Function anonymous], "onTime": [Function anonymous], "style": [Object]}, "memoizedState": null, "mode": 2, "pendingProps": {"config": [Object], "controls": false, "onBeforePlay": [Function anonymous], "onComplete": [Function anonymous], "onPause": [Function anonymous], "onPlay": [Function anonymous], "onPlayerError": [Function anonymous], "onPlayerReady": [Function anonymous], "onPlaylistItem": [Function anonymous], "onSeek": [Function anonymous], "onSetupPlayerError": [Function anonymous], "onTime": [Function anonymous], "style": [Object]}, "ref": [Function ref], "return": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.5719165802001953, "actualStartTime": 4802189461.109166, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "deletions": null, "dependencies": null, "elementType": [Function JWPlayer], "flags": 513, "index": 0, "key": null, "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function PlayerModel@29.setRefPlayer], "return": [FiberNode], "selfBaseDuration": 0.19495868682861328, "sibling": null, "stateNode": [JWPlayer], "subtreeFlags": 512, "tag": 1, "treeBaseDuration": 0.20037460327148438, "type": [Function JWPlayer], "updateQueue": [Object]}, "selfBaseDuration": 0.005415916442871094, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 99, "viewConfig": [Object]}, "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.005415916442871094, "type": "RNJWPlayerView", "updateQueue": null}, "bubbles": undefined, "cancelable": undefined, "currentTarget": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.37479114532470703, "actualStartTime": 4802189461.305, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RNJWPlayerView", "flags": 512, "index": 0, "key": "RNJWPlayerKey-0", "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function ref], "return": [FiberNode], "selfBaseDuration": 0.005415916442871094, "sibling": null, "stateNode": [Circular], "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.005415916442871094, "type": "RNJWPlayerView", "updateQueue": null}, "_nativeTag": 99, "viewConfig": {"Commands": [Object], "Constants": [Object], "Manager": "RNJWPlayerViewManager", "NativeProps": [Object], "baseModuleName": "RCTView", "bubblingEventTypes": [Object], "directEventTypes": [Object], "uiViewClassName": "RNJWPlayerView", "validAttributes": [Object]}}, "defaultPrevented": undefined, "dispatchConfig": {"phasedRegistrationNames": {"bubbled": "onSeek", "captured": "onSeekCapture"}}, "eventPhase": undefined, "isDefaultPrevented": [Function functionThatReturnsFalse], "isPropagationStopped": [Function functionThatReturnsFalse], "isTrusted": undefined, "nativeEvent": {"from": 17.700166499, "target": 99, "to": 15}, "target": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": undefined, "actualDuration": 0.37479114532470703, "actualStartTime": 4802189461.305, "alternate": null, "child": null, "childLanes": 0, "deletions": null, "dependencies": null, "elementType": "RNJWPlayerView", "flags": 512, "index": 0, "key": "RNJWPlayerKey-0", "lanes": 0, "memoizedProps": [Object], "memoizedState": null, "mode": 2, "pendingProps": [Object], "ref": [Function ref], "return": [FiberNode], "selfBaseDuration": 0.005415916442871094, "sibling": null, "stateNode": [Circular], "subtreeFlags": 0, "tag": 5, "treeBaseDuration": 0.005415916442871094, "type": "RNJWPlayerView", "updateQueue": null}, "_nativeTag": 99, "viewConfig": {"Commands": [Object], "Constants": [Object], "Manager": "RNJWPlayerViewManager", "NativeProps": [Object], "baseModuleName": "RCTView", "bubblingEventTypes": [Object], "directEventTypes": [Object], "uiViewClassName": "RNJWPlayerView", "validAttributes": [Object]}}, "timeStamp": 1678982338417, "type": undefined}.

Also if the player doesn't play(pause) forward to 15 seconds work just as expected Thanks

fvasyliukApiko commented 1 year ago

@chaimPaneth Is this information useful for you?

fvasyliukApiko commented 1 year ago

bug reproduced if parent View has height 0