camomile-project / camomile-polymer-client

A polymer client for camomile
https://camomile-project.github.io/camomile-polymer-client/
2 stars 3 forks source link

Add option to only sync medium #52

Open hbredin opened 7 years ago

hbredin commented 7 years ago

(related to #51)

Right now, we can either sync-current-time, sync-playing or both (with sync-all). All three options actually sync the medium as well.

There should be a way to only sync the medium (hence its URL) when you don't want to sync anything...

// only sync the medium
<camomile-player [...] src="mediumView"></camomile-player>

// sync the medium and its "currentTime" property
<camomile-player [...] src="mediumView" sync-current-time="mediumView"></camomile-player>

// sync the medium and all its properties
<camomile-player [...] src="mediumView" sync-all="mediumView"></camomile-player>

// this could be also supported and would be equivalent 
// here, True would mean "sync-all = src"
<camomile-player [...] src="mediumView" sync-all=True></camomile-player>

// but this could be also possible:
<camomile-player [...] src="mediumView" sync-all="anotherMediumView"></camomile-player>

cc @PaulAlbert31

rom1504 commented 7 years ago

Maybe MediumView should become just View, and elements could connect to that view and specify a medium independently ?

<camomile-player [...] src="medium" sync-all="someView"></camomile-player>

It can make sense to sync on different views, but I'm not sure if it makes sense for an element to have for sources actual different mediums.

edit: "view" would then just be a pubsub

hbredin commented 7 years ago

I like your proposal very much.

edit: then we should probably rename "View" to "Sync"