Some popular, commercially available HTML5 video players are essentially big chunks of JavaScript. JWPlayer is one. I use a different one but it's similar in set up.
These players embed in a way that seems out of step with client-side MVC frameworks in general. The players want to render themselves to the DOM. You instantiate a player object and pass a DOM element to it's constructor. Like...
mediaPlayer = new CommercialVideoPlayer("some-place-in-DOM");
The player then renders itself to "some-place-in-DOM".
Doesn't that conflict with view rendering in marionette - with the region manager showing views?
In other words this "player rendering itself" thing seems, on my first look, to conflict with the notion that marionette wants to render. It wants its region manager to map views to DOM elements. It doesn't want some player sticking things in the DOM.
It wants to do...
someRegion.show(someView);
I'm not wrapping my brain around where my HTML5 video player goes in there? Inside a view?
When I put it inside a view and then attempt to show it, like...
videoRegion.show(videoView);//media player is inside videoView
...I get nothing because marionette's region manager and the player are fighting over who gets to render where.
I think I just lack a conceptual understanding of what marionette js would want me to do with this media player. I'm looking for an understanding and a best practice.