Skip to content

feature: separate player and transcript shortcodes #128

@composerjk

Description

@composerjk

@maboa: A little while back, I started a quick implementation of separate player and transcript shortcodes. So, one could place the player and transcripts in different spots; also, make it easier to have two transcripts attached to the same hyperaudio player. I'm in the process of moving this to live, so thought I would mention. Will try to clean up more in case you're interested in including something like it.

Here's an example with two synchronized transcript windows: transcript + chat. Transcripts are files in custom fields. Set up with something like:

Set up the player:

[hyperaudio_player id="haplayer1" width="100%" height="600px" transcript-height="1em" show-active="true" src='https://player.vimeo.com/video/{{dc:post:meta key="video_id"}}']

Transcript 1 in one spot:

[hyperaudio_transcript id="transcript1" player_id="haplayer1" file="{{dc:acf:post_field field="transcript_file"}}" show_hyperaudio_production="false"]

Chat 1 (i.e., transcript 2) in another spot:

[hyperaudio_transcript id="chat1" player_id="haplayer1" file="{{dc:acf:post_field field="chat_file"}}"]
image

The current code for the shortcodes is on our player-transcript-shortcodes branch. I also put together a test-separate-shortcodes-release branch to include recent PRs #123 and #124 I submitted since I'm moving this from staging to production. This still more cleanup to do, but I thought I'd share the progress and add a note. Will try to cleanup at some point and submit a PR when ready.

I also added an option to disable the A Hyperaudio Production mark with a show_hyperaudio_production attribute on the hyperaudio_transcript shortcode, so that one doesn't end up with it on every transcript.

I was just reminded that I had made a change (not included in the branches) to the default scrollerOffset from 0 to -160 so that the highlighted portions of the transcripts are more centered. Will open an issue to mention adding support of specifying that value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions