Comments (3)
Unfortunately, menu-button-press
can only detect navigation between documents (screens) and player is always displayed as an overlay on the same screen.
However, we can detect when the player is dismissed with its own events.
const player = new Player();
player.playlist = new Playlist();
player.playlist.push(mediaItem);
player.addEventListener('stateDidChange', event => {
if (event.state === 'end') {
handlePlayerClosure();
}
});
player.play();
More info about available events can be found in the TVJS documentation
from tvdml.
Okay, thank you for the detailed answer. I have already integrated state change listener but it never got called when I closed the player with a menu button. I guess I have to do add some logic in the document from which the player gets opened.
from tvdml.
You're welcome. I'll close the issue, but feel free to ask questions if you have other problems 👍
from tvdml.
Related Issues (20)
- componentDidMount not called when menu bar highlighted HOT 5
- lifecycle methods not called in right order HOT 4
- hidden write to sessionStorage HOT 2
- Memory leak HOT 1
- Remove useSyncScheduling flag after new react-reconciler release
- Fix crash on closing modal document on tvOS 11.3
- redirect feature doesn't work HOT 2
- render() is called before componentDidMount() HOT 4
- DataItem() vs. Virtual DOM HOT 3
- support for versions higher than node 8 HOT 2
- Navigating to a document that is not in the Menu Bar loses access to Menu Bar HOT 5
- Testing with Jest HOT 7
- Issue with react rendering when data changes HOT 18
- What happened to the TVDML.createPlayer? HOT 3
- tvOS 12 and Xcode 10 errors and crashes HOT 40
- Menubar highlight event & Component reload HOT 3
- How to set multiple attributes in data binding? HOT 3
- Is TVDML still active? HOT 2
- Overlay Document on Video HOT 11
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 tvdml.