Ticket #1262 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

Accept JSON flashvars in Flash mode

Reported by: pablo Owned by: pablo
Priority: Milestone: Player 5.6
Component: general Keywords:
Cc: Forum thread:

Description

Currently, the player cannot accept JavaScript objects as configuration options. This limitation results in the embedder needing to perform some gymnastics in order to send JSON-style configuration into the player post-embed (for JSON playlists, for example).

Another use case is plugins which may benefit from having its configuration represented in a nested structure.

The embedder should be able to accept objects in its configuration and pass the entire object to the player in Flash mode.

The proposed mechanism is:

  1. Have the Embedder serialize the JSON into a string (perhaps with some sequence of identifier characters to differentiate it from a string containing curly braces)
  2. Pass the serialized JSON to the Flash player at embed time via flashvars
  3. In Flash mode's Configger class, de-serialize any options (player or plugin) in serialized JSON format into generic Objects.

Change History

comment:1 Changed 2 years ago by jeroen

This is exactly what I was looking for for the Captions plugin - support for this would mean inline captions can be supported:

plugins: {
  captions: {
    entries: [
      {start:1.2, end: 3.0, text: "Hello world" },
      {start:4.0, end: 6.5, text: "These are inline captions." }
    ]
  }
}

comment:2 Changed 2 years ago by pablo

Completed in 1661

comment:3 Changed 2 years ago by pablo

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.