-
Notifications
You must be signed in to change notification settings - Fork 805
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
Show HLS Playlist for the VideoPress video url, instead of fragmented mp4 file #20839
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: compat | ||
|
||
VideoPress file url field now displays the HLS playlist if one was generated. The fragmented mp4 file is not meant to be played on its own. MP4 file will only be displayed as the video url if it was created prior to the HLS update. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -731,7 +731,11 @@ function videopress_get_attachment_url( $post_id ) { | |
return null; | ||
} | ||
} else { | ||
$return = $meta['videopress']['file_url_base']['https'] . $meta['videopress']['files']['hd']['mp4']; | ||
$return = $meta['videopress']['file_url_base']['https'] . ( | ||
$meta['videopress']['files']['hd']['hls'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we check if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I can change the condition here to be more explicit with an |
||
? $meta['videopress']['files']['hd']['hls'] | ||
: $meta['videopress']['files']['hd']['mp4'] | ||
); | ||
} | ||
|
||
// If the URL is a string, return it. Otherwise, we shouldn't to avoid errors downstream, so null. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have it pull the
hd_1080p
entry if it's available? I think maybe we discussed this on our call but can't remember what decision was made there 😄There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe this is fine for now until we have streaming playlists and can just use those 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats what I was thinking. I don't want to start hard-coding format lists in Jetpack again, and once adaptive is ready we'll just use that.