Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

How to leave DOM node completely untouched? #553

Closed
pbhogan opened this issue Jun 8, 2015 · 4 comments
Closed

How to leave DOM node completely untouched? #553

pbhogan opened this issue Jun 8, 2015 · 4 comments

Comments

@pbhogan
Copy link

pbhogan commented Jun 8, 2015

I did a little experiment trying to keep a media player (JW Player) playing continuously while browsing a site. I put it in a part of the page marked with data-turbolinks-permanent and sure enough the player survives page transitions, but it seems to reinitialize on page switch.

Is Turbolinks cloning the node or disconnecting and reconnecting it to the DOM causing the embedded player to think it should reinitialize? Is there a way to leave the DOM node completely untouched?

@tombroomfield
Copy link

Are you using Jquery tubolinks?

@pbhogan
Copy link
Author

pbhogan commented Jun 9, 2015

Yes, I am.

@qq99
Copy link

qq99 commented Jun 17, 2015

@pbhogan
Yeah I think I've encountered the same thing that you have, but using https://github.com/Shopify/turbograft

Disconnecting the node from the DOM and re-adding it can have negative effects:

  • full screen API status is cancelled
  • playing state oddities like you've noticed
  • css transitions/animations are killed

@Thibaut
Copy link
Collaborator

Thibaut commented Jul 20, 2015

This is a limitation of the DOM. AFAIK there is no solution. See #511.

@Thibaut Thibaut closed this as completed Jul 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants