Opened 11 years ago
Closed 11 years ago
#27915 closed defect (bug) (fixed)
Problems with subtitles and what should Tracks field really do?
Reported by: | pavelevap | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.9.1 | Priority: | normal |
Severity: | major | Version: | 3.9 |
Component: | Media | Keywords: | has-patch commit fixed-major |
Focuses: | javascript | Cc: |
Description
In "Video details" modal window, there is "Tracks" field at the bottom. Before I figured out that it is for tracks tag with kind attribute, I tried to wrote some description, but nothing happened on front end. Maybe this field should not be editable? Or some kind of help would be nice. Users are not developers.
I tried to add some subtitles and now there are two fields and I can edit both of them? See attached screenshot.
Tracks field should be available also for audio files?
I tried to upload .srt subtitle file but it is not allowed. But users usually know .srt files. #27643
I tried to add subtitles, but I had many .txt and .csv files in modal window. Why? There should be only supported formats available?
I was not able to add subtitles to my video file. After adding them and click "Update" they are not in shortcode and missing also from Tracks field.
Also after adding subtitle file to video, but it is not available in my video playlist? How can I add subtitles to my video playlist? And why should I set it on another place? When I add subtitles to my video, I want it to be saved also to Media library (as Featured image).
But in the end, I was not able to add subtitles to my video :-(
Attachments (3)
Change History (18)
#1
@
11 years ago
- Focuses javascript added
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 3.9.1
#2
@
11 years ago
The inside of the video shortcode is getting dropped when switching to the Text tab - not good.
#3
follow-up:
↓ 4
@
11 years ago
I was not able to add subtitles to video in any way, never inserted whatever I tried.
#4
in reply to:
↑ 3
@
11 years ago
Replying to pavelevap:
I was not able to add subtitles to video in any way, never inserted whatever I tried.
Thanks for the clarification, but I'm just adding notes to the ticket.
#6
follow-up:
↓ 8
@
11 years ago
- Severity changed from normal to major
So... this is a pretty serious issue...
I am going to need someone with more in-depth TinyMCE knowledge to help me, but I think there is a race condition happening.
Do the following:
- Insert a Video into a post
- Click to Edit
- Add Subtitles
- Click "Update"
If you don't see the CC logo in the video player, some weird race condition is happening that is causing the view to not re-render.
Edit the Video again: the subtitles are there in the modal, click Update. All seems to work. Sometimes, the race condition doesn't occur so the view rendered properly.
EVERY time though, when you click from Visual to Text, the shortcode drops its content, which is where the <track>
s are stored. That may be false, but it seems to be what is happening. If you have a video shortcode, edit it (replace the video or something), and then click over to the Text tab, the shortcode is updated.
I even tested manually replacing the shortcode in the textarea #content
on update
(adding subtitles), but it always gets reverted to a [video]
with no body when switching to Text mode.
This ticket was mentioned in IRC in #wordpress-dev by wonderboymusic. View the logs.
11 years ago
#8
in reply to:
↑ 6
@
11 years ago
Replying to wonderboymusic:
EVERY time though, when you click from Visual to Text, the shortcode drops its content, which is where the <track>s are stored.
Caused by replacing the wpview wrapper <div> node with a <p> node in TinyMCE on getting the content/saving. The shortcode string together with any HTML that is wrapped in the shortcode gets added inside that <p> node. As <track> is not valid inside a <p>, it gets stripped by the internal cleanup in MCE.
Seems the way to fix it is to go back to replacing wpview wrappers on PostProcess
with a regex. Patch coming up.
#9
@
11 years ago
- Keywords needs-testing added
27915.patch fixes the removal of <track> tags wrapped in the shortcodes.
Still can't see the cc logo in the player inside the editor. Happens also on loading a post that has a proper [video]<track>[/video]
shortcode. This seems minor compared to the removal of <track> on saving.
Yeah, the textarea is not supposed to be visible