Open VTT and media file from plugin
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc cách sử dụng plugin API xung quanh Main.OpenSubtitle, Main.SetSubtitle, Settings.RecentFiles và VideoPlayer.Initialize. Theo dõi cách việc mở phụ đề và tệp phương tiện từ menu cập nhật các tệp gần đây, đích lưu và trạng thái sau khi khởi động lại. Công việc được xem là hoàn tất khi một plugin có thể mở cả hai loại tệp thông qua API được cung cấp cho mục đích này, đồng thời các tệp chính xác được duy trì, mở lại và vẫn được liên kết với việc lưu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The first part of the problem that I'm running in to is opening the VTT (web based) in the app. Since Main.OpenSubtitle is hidden by the protection level I'm using Main.SetSubtitle. It opens just fine but when I go to save it seems to go to the latest entry in the Settings.RecentFiles. I've added my file(s) to the RecentFiles (and saving settings) but they don't display in the 'Reopen' menu and are lost when closing the app. Also, when the app is closed and restarted it reverts back to the last file opened from the menus.
Is there something I'm missing? Is there something in the plugin API that I should be using? I've also tried to change the protection level in SubtitleEdit source code to public but intellisense didn't pick up on it so it's unavailable. I probably have to compile and reference it but I'd like to do this the way it was intended rather than a source code change.
Second part is opening the media files (usually MP3 or WAV). I can't find any other way so I find the player control in Main and use VideoPlayer.Initialize to load the file. Seems to be the same issue (protection level).
Bottom line: how can I open files (subtitle and media) in a way that is consistent with opening the dialog box from the menu?
This code opens the MP3 file in the player but does not reopen after closing the app:
objVideoPlayer = (Nikse.SubtitleEdit.Controls.VideoPlayerContainer)objVP1s[0];
if (objVideoPlayer.VideoPlayer != null)
{
objVideoPlayer.VideoPlayer.Initialize(objVideoPlayer, strAudioFileName, EH1, EH2);
_parentForm.VideoAudioTrackNumber = 0;
}
This opens a VTT file but also does not reopen when the app is restarted nor will the correct file be written to when the save button is clicked:
Nikse.SubtitleEdit.Core.Common.Subtitle _subtitle = new Nikse.SubtitleEdit.Core.Common.Subtitle();
Encoding objEnc = Encoding.UTF8;
Nikse.SubtitleEdit.Core.Common.Subtitle objNEWST = new Core.Common.Subtitle();
_subtitle.LoadSubtitle(strTempVTTFileName, out objEnc, Encoding.UTF8);
- Ngôn ngữ chính
- C#
- Star
- 138
- Fork
- 48
- Merge trung bình
- 5 phút
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SubtitleEdit/plugins
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
SubtitleEdit/plugins#286 ·
-
HELP WITH REBALANCINGĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
SubtitleEdit/plugins#283 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
SubtitleEdit/plugins#274 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
SubtitleEdit/plugins#266 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
SubtitleEdit/plugins#265 · 2 bình luận ·
Tất cả issue của SubtitleEdit/plugins
Issue tương tự
-
0 - Backlog Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
BrighterCommand/Brighter#4444 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:frontend bug FE P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
klasolsson81/jobbliggaren#1915 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/vscode-copilotstudio#431 ·
Maintainer thường phản hồi trong vòng 2 ngày