GithubHelp home page GithubHelp logo

Comments (9)

protyposis avatar protyposis commented on August 16, 2024

Proposed API extension:

interface TimelineMarker {
  /**
   * Optional CSS classes that are applied to the marker and can be used to differentiate 
   * different types of markers by their style (e.g. different color of chapter markers and 
   * ad break markers). 
   * The CSS classes are also propagated to a connected `SeekBarLabel`.
   * 
   * Multiple classes can be added to allow grouping of markers into types (e.g. chapter markers, 
   * ad break markers) by a shared class and still identify and style each marker with distinct 
   * classes (e.g. `['marker-type-chapter', 'chapter-number-1']`).
   */
  cssClasses?: string[];
  /**
   * Optional duration that makes the marker mark an interval instead of a single moment 
   * on the `SeekBar` timeline.
   */
  duration?: number;
}

class UIManager {
  /**
   * Returns the list of all added markers in undefined order.
   */
  getTimelineMarkers(): TimelineMarker[];
  /**
   * Adds a marker to the timeline. Does not check for duplicates/overlaps at the `time`.
   */
  addTimelineMarker(timelineMarker: TimelineMarker): void;
  /**
   * Removes a marker from the timeline (by reference) and returns `true` if the marker has 
   * been part of the timeline and successfully removed, or `false` if the marker could not
   * be found and thus not removed.
   */
  removeTimelineMarker(timelineMarker: TimelineMarker): boolean;
}

from bitmovin-player-ui.

protyposis avatar protyposis commented on August 16, 2024

Open questions:

  • Do we want to support these markers on live streams as well? (the markers would have to be animated and move across the timeline as the playhead progresses/changes)
  • Do we want to allow customization of the SeekBarLabel? (this label currently displays the time, an optional title text, and a thumbnail if available)
    • Deactivate the label per marker?
    • Allow a custom image instead of the thumbnail?
    • Allow custom content instead of the default content?

from bitmovin-player-ui.

unki2aut avatar unki2aut commented on August 16, 2024

Notes from architectural meeting 2018-06-19

  • We don't support markers on live streams right now
  • Add cssClasses property to TimelineMarker, the same classes would be propagated to the label
  • A content() callback which returns a DOM element could be added in the future

from bitmovin-player-ui.

protyposis avatar protyposis commented on August 16, 2024

API extension updated: #103 (comment)

from bitmovin-player-ui.

protyposis avatar protyposis commented on August 16, 2024

Renamed method names to include Timeline for more consistent naming that matches the object type's name, e.g. getMarkers -> getTimelineMarkers.

from bitmovin-player-ui.

protyposis avatar protyposis commented on August 16, 2024

Released in 2.16.0

from bitmovin-player-ui.

 avatar commented on August 16, 2024

Just a minor issue; is there any place where these API calls are documented? I tried to use the search functionality for version 7 and version 8, but no search results appeared. It shouldn’t be too difficult to figure it out from the code, but I was about to open an issue as I didn’t think this functionality was implemented.

from bitmovin-player-ui.

protyposis avatar protyposis commented on August 16, 2024

You were searching the player API docs which only contains player API, no UI API. The main documentation of the UI is this repository with the readme, changelog, source code and issues.

from bitmovin-player-ui.

 avatar commented on August 16, 2024

Ah, okay. I’ve had a bit of a struggle distinguishing the boundaries of the two, but I think I’m starting to get it.

from bitmovin-player-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.