SplitmediaLabsLimited / xjs

XSplit JS Framework. Make plugins for XSplit Broadcaster, quickly and easily.
Other
39 stars 11 forks source link

Better handling of videoitems linked to the same source #119

Closed mikeybanez closed 7 years ago

mikeybanez commented 7 years ago

Since XSplit is modifying the concept of global sources to be more intuitive, we need to modify the framework to reflect these changes.

Framework level changes: 1) The prop:globalsrc property is now totally separate from "Keep Loaded in Memory". To preserve behavior with XBC 2.8, make sure that we only separate setting/checking of both props in XBC 2.9, onwards. 2) XBC 2.9 now allows improved functionality, so we will need to modify Item.duplicate to allow to duplicate/paste as linked or unlinked to the original source. 3) name and cname are now the same across all linked items. Make sure that these are shown to be common to all of the renderers for a specific source. (Documentation wise: please add comments to those methods saying that in XBC 2.8, names may be different but in 2.9, they are the same across all items linked to the same source.)

Documentation changes: Simply reduce the mention of "global" and use "linked" more often. Let's also make the doc for this more complete (give examples for the actual XBC 2.9 behavior, then give code examples to accomplish the same).

virn commented 7 years ago

Here are the changes I made for each item:

  1. Added globalsrcMinVersion(2.9) on util/version to use as checking for the application of prop:globalsrc on setKeepLoaded and no longer set it if the current version is greater.
  2. Item.duplicate now accepts a parameter(boolean) to set if the duplicate item would be linked or not to the original item. Not adding a parameter would default it to unlinked. Additionally, per reading the discussion on XBC-5883, I added a condition to set "keeploaded" to true if parameter is set to true.
  3. Updated the docs for name and cname to specify the changes made in 2.9 and the behavior it used to have on 2.8. And latest docs use link/linked instead of global.

Additional:

  1. I created a Item.unlink method following XBC-5883.
    • Unlink methods sets "prop:globalsrc" to 0 of the item. Would unlink selected Item to the other Items that may be linked to a source.
mikeybanez commented 7 years ago

Following comments are for #111 and #119 combined. This might not be an exhaustive list so we will need to go through another round of review later.

virn commented 7 years ago

Item finished and closed on 7bf0409