Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2I: seekTo for video #19891

Closed
29 tasks
alanorozco opened this issue Dec 14, 2018 · 8 comments
Closed
29 tasks

I2I: seekTo for video #19891

alanorozco opened this issue Dec 14, 2018 · 8 comments
Assignees
Labels
Component: amp-video & interface amp-video and video interface/manager INTENT TO IMPLEMENT Proposes implementation of a significant new feature. https://bit.ly/amp-contribute-code P2: Soon Stale Inactive for one year or more Type: DevX issues impacting developer experience WG: components

Comments

@alanorozco
Copy link
Member

alanorozco commented Dec 14, 2018

Goal

Implement a high-trust seekTo action for video.

Details

API

Mimic the amp-animation API:

on="tap: myVideo.seekTo(time=, percent=)"

Where time is specified in seconds and percent between [0, 1]. Both params are optional but one of them should be set.

Implementation

VideoInterface

Basic boilerplate and implementation for amp-video filed in #19893.

amp-video

See above.

VideoManager action

VideoManager#registerCommonActions_ should add seekTo. For reference on how the callback can be implemented, see amp-animation.js.

amp-video-iframe

This introduces the concept of method parameters to amp-video-iframe. AmpVideoIframe#method_() should understand this concept by taking an optional JsonObject to be passed along postMessage in the params field. timeSeconds must be passed as an int, and since this is a JsonObject the video-iframe-integration.js library should unmarshall them correctly.

In the video-iframe-integration.js library, the method method (mea culpa for bad naming choices here) takes a params field that can be either a JsonObject or null.

Once this is bootstrapped, videoJS and jwplayer integrations should be simple executions of method.

amp-youtube

The YouTube JS SDK supports seekTo so we can build off of that.

amp-ima-video

(@torch2424 to add details)

Feasability with other players

Different players can either support this new method or not. Feasibility of each needs to evaluated and implemented independently. Readers can feel free to chime in for prioritization, but we'll start with amp-video, amp-youtube and amp-video-iframe to support a large surface initially.

Burn down

/cc @aghassemi @sanchezedgar

@alanorozco alanorozco added the INTENT TO IMPLEMENT Proposes implementation of a significant new feature. https://bit.ly/amp-contribute-code label Dec 14, 2018
@alanorozco
Copy link
Member Author

Hi @sanchezedgar

I think this is something we can work on together. I've wrote down a basic burndown list and I'll start going with a few tasks :)

@alanorozco
Copy link
Member Author

@mister-ben It looks like the Brightcove API supports seeking. Is this something you'd be interested in adding to amp-brightcove? There's a VideoInterface.seekTo boilerplate PR (#19893) that would make this fairly simple to achieve.

@alanorozco
Copy link
Member Author

@sanchezedgar I assigned you a couple of tasks if you'd like to begin work on amp-video-iframe support and overall action triggering.

@torch2424 torch2424 self-assigned this Dec 14, 2018
@torch2424
Copy link
Contributor

I can handle this for amp-ima-video.

@alanorozco Is there alreadya . Design doc / design review done for this?

@alanorozco
Copy link
Member Author

@torch2424 No design doc needed, this issue should serve the same purpose.

There's not a lot to review but the API, and I think that's fairly uncontroversial. If you'd like to present it next week, feel free, but I'm out until Jan :( Let's discuss design here in the meantime.

@torch2424
Copy link
Contributor

@alanorozco Sounds good! Since amp-ima-video is essentially a custom player, we communicate with it using iframe postMessage. Thus I'll just create a new message type, with a value we should scroll to 😄

Let's try to coordinate implementing around the same time, that way videos on AMP stay consistent. I'm in no rush to implement this, and we can wait until you get back. Unless someone feels otherwise.

@mister-ben
Copy link
Contributor

@alanorozco we will add this

@stale
Copy link

stale bot commented Dec 31, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive for one year or more label Dec 31, 2020
@stale stale bot closed this as completed Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: amp-video & interface amp-video and video interface/manager INTENT TO IMPLEMENT Proposes implementation of a significant new feature. https://bit.ly/amp-contribute-code P2: Soon Stale Inactive for one year or more Type: DevX issues impacting developer experience WG: components
Projects
None yet
Development

No branches or pull requests

7 participants