Comments (5)
When changing the source on the player you 'reset' the player. This implies that the ready_state is also reset en will only be updated once new ready_states are reached, i.e. playback is started/continued. The same applies to onTimeUpdate events. This event indicates changes in the 'currentTime' of the player, so when the player is in a 'playing' mode, updating the currentTime. From the described use-case it sounds like you set a new source and pause the player. As a result ready_state changes and timeUpdate events will start to appear once the player starts playing again. If you would do a seek without changing the source, it would indeed make sense to trigger these events as they indicate a state change on the current player instance.
What is the use-case that needs to be handled by the events you are expecting? Maybe a different approach could provide the required info?
from react-native-theoplayer.
In our use-case we are switching from a live stream to an open-replay stream. When the user pauses the live stream he will end up in an open-replay stream that is paused. The source changes when transitioning to the open-replay stream. We also receive a position that we need to seek to. At this time the user should see the last frame on the player that is paused. Now no frame is shown and only when the user starts the playback the stream is shown.
from react-native-theoplayer.
Does the simple workaround of briefly starting and stopping playback of the second stream (e.g. till first timeUpdate event) to show the first frame suffice for now to support your use case?
from react-native-theoplayer.
@janvandertaelen did the work-around help you out?
from react-native-theoplayer.
Workaround works but is not ideal.
setPlayerIsPaused(false); setTimeout(() => { setPlayerIsPaused(true); }, 1);
we are doing this when a new source is loaded. If you can fix that after a new source is loaded that onReadyStateChange is called it would remove our dirty hack.
from react-native-theoplayer.
Related Issues (20)
- When screen is off and PIP is playing, phone gets really hot and drains battery fast HOT 6
- Android error on build (Unresolved reference: setAllowBackgroundPlayback) HOT 3
- react-native-theoplayer not properly handling IMA ads on iOS HOT 10
- AdEvent `timeOffset` is always 0 after first ad break for IMA ads on iOS HOT 2
- HH:MM:SS timestamps do not work for IMA ads on iOS HOT 2
- Setting `currentTime` during an `AD_BREAK_END` event does not work HOT 2
- Android API 32+ media session artwork fit HOT 1
- Android PIP layout is broken HOT 6
- Android livestream buffering error HOT 3
- Issues while compiling THEOplayer with ReNative framework HOT 12
- A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction HOT 5
- After version 3.2.1 the project fails to build on iOS when using expo HOT 4
- Version 3.7.1 gives a React Render Error HOT 3
- GOOGLE_IMA SDK makes app crash in Android 14 HOT 7
- Latest theplayer with android sdk 7.0.0 is failing HOT 3
- Library not compatible with [email protected] HOT 2
- Player still not working on react-native-tvos @0.74 HOT 3
- Seeking on LiveStream HOT 7
- Android build error: Execution failed for task ':react-native-theoplayer:compileDebugKotlin' HOT 3
- OutOfMemory Error on Android with react-native-theoplayer and react-native-theoplayer-ui HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-theoplayer.