Coder Social home page Coder Social logo

mikesteele / dual-captions Goto Github PK

View Code? Open in Web Editor NEW
228.0 10.0 40.0 82.28 MB

🌐 Subtitles in two languages for YouTube & Netflix

Home Page: https://chrome.google.com/webstore/detail/two-captions-for-youtube/lpeonmjfimoijceaalocpgjjchocbiap/related

License: MIT License

JavaScript 94.49% HTML 0.59% CSS 4.68% Shell 0.24%
chrome-extension youtube netflix kanopy

dual-captions's People

Contributors

dependabot[bot] avatar mikesteele avatar roseperrone avatar tamama9527 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dual-captions's Issues

Doubles same language

For version 2.0.

State I: New Video
Just start a video. In this case: https://www.netflix.com/watch/81035324?trackId=14170286
Note English subtitles
PastedGraphic-3

The extension has not yet been started:
PastedGraphic-4

State II: Turn Dual Captions On
PastedGraphic-5
Note English shows up as the only other option.

Sure enough, get to see English twice:
PastedGraphic-6

State III: Workaround
To get around the bug, go to Netflix subtitle selection and choose the other language:

PastedGraphic-7

PastedGraphic-8

v2: Popup should communicate with observer

Popup should be able to access and respond to observer state.

Already running

  • If observer is running, override DUAL_CAPTIONS-captionsOn-${activeTabId} and show ON button.

Errors

  • YouTube player not found on page
  • Translation error

youtube (cc)

Unbenannt
hi

i tried it for hours but i didnt get it run. - any viedo can't show the 2 subtitels or one subtitel (when the plug in ) is aktiv. does i make something wrong? in my youtube i dont have the "cc" icon (see the picture what i have instead) maybe thats the problem?

thx josef

problem

the program has not worked so when i made it on the original subtitle hidden and nothing working

Strange behavior while watching "The Protector" on Netflix

I'm watching "The Protector" on Netflix. These are the subtitle choices:

image

I select "English" in the Netflix menu once to load it, then select "Turkish [CC]" in the Netrlix menu, and then I turn on dual captioning with the plugin, selecting "English" in the plugin menu.

Sometimes no subtitles are displayed. Sometimes only Turkish is displayed. I can't get them both to display. When I check the console, I see lots of 503 responses from google translate (google-translate-api.js:85):

image

The full response is here: f.txt

I don't know why it's trying to hit Google translate when the subtitles are available from Netflix already.

  • Plugin display should list the languages that have been loaded by the user already (the checkmark instructions were unclear to me; I wasn't sure where I was supposed to see a checkmark).
  • Should not hit Google translate API if the selected second language is already available
  • Should gracefully handle 503 responses from Google

YouTubeTranslationFetcher doesn't support "name" param

Control Bar - Subtitles - Covered

Hello, hello! (((:
untitled

Is it possible to move the subtitles above the control bar of Netflix? Or remove the visible control bar?

The issue is:
When I stop the video the control bar cover the subtitles and you're obliged to wait for the control bar disappear to be able to read the dual subtitles.

--- I really try to study just waiting for the control bar disappear but take it so long.. (even if the control bar stays just for a couple seconds if you stopped the video all the time this few 'seconds' starts to annoying. haha ---

PS: Many thanks again, you're awesome

v2: browser_action icon should reflect extension state

Proposed states:

Disabled

Current icon, 50% brighter. Shown on all pages that do not match https://youtube.com/watch*.

Available

Current icon.

Running

Current icon with green triangle in bottom right corner, noting that Dual Captions are running.

Stopped

Current icon with grey square in bottom right corner, noting Dual Captions was stopped by the user.

Need mouse movement to make secondary subtitle shows

Hi. Again I am running 1.6 on Netflix with the Club de Cuervos show (https://www.netflix.com/watch/80197454). This time some how (not sure how) both Spanish and English are set.

However, often times (once every 10 or so lines) the secondary subtitle does not show up:
image

I can make the secondary appear by moving the mouse a bit to get something like this:
image

As you may be able to guess, the show does not even need to be running, it can be paused, and moving the mouse still makes the second subtitle appear. This is the latest Chrome (Version 74.0.3729.169 (Official Build) (64-bit)) on Mac OS X.

Add error for no automated captions support

DC can detect if the caption window is automated captions via a class.

// Automatic captions (.ytp-caption-window-rollup) won't work, so we prevent using them.

So we should tell the user in the pop up that automated captions aren’t supported yet.

This involves:

  • New error type (maybe ‘no-automated’)
  • Add error case to Chrome message ‘turn-on’
  • Add en/fr translations to public/locales

new idea for the "dual capture"

Yesterday I tried to get it to work - pretty long needed ... and the result was not what I hoped ...
I researched on the internet how to learn a language in this way. The result was that the most helpful thing is to have a word for word (!) Translation (de-coding). So it's easy to understand words. At first, it is unusual, because in the word for word translation grammatically wrong sentences arise. The interesting thing, however, is that the brain abstracts and learns the grammar of the other language.

short explanation in german (unfortunately german, but with subtitles you should understand it - she seems stupid, but this woman is a big women in the german speaking area - but unfortunately already deceased)
https://www.youtube.com/watch?v=b_D7k8dFjZg

Example dual-translation (this function or type of translation would be damn cool to integrate into the "plug-in")
https://www.youtube.com/watch?v=STb-JXIANEU

Please do not misunderstand this message. I do not want to talk or criticize anything bad here or play the teacher. i just want to bring in my idea of ​​which i am convinced - and maybe you can program this with a not too big mission - i (and maybe others here?) would also be willing to pay for this function. (and please also make it compatible with amazon, not just netflix :))

thx
Joseph

DeepL as translation engine

I'd like to recommend deepl.com as a translation engine. I have had much better luck with it than with Google. Try for example,

According to this link (https://www.deepl.com/pro.html) the API is a pro option. If you would like, I can reach out to them to see if they would make the API available for free for this application.

v1.5.0 - Netflix - Korean now uses `.image-based-timed-text`

Korean now uses .image-based-timed-text, causing the same issue as Chinese and Japanese subtitles. (See #48 and #20) It should be warned that Korean subtitles won't be able to be used with Google Translate.

However, it's worth investigating if "captions from Netflix" can be rendered alongside image subtitles.

UI2 checklist

On branch ui2-localized

  • React
  • Localized
  • Redux?
  • Persistent state, stored in chrome.storage
  • Extra space setting
  • Remove original caption setting
  • Help page
  • Sites page
  • Language options are in own language ("French" -> "Français")

Translations added for

  • English
  • French
  • Spanish
  • Portuguese
  • Russian
  • Korean

Subtitles not being shown

Hello admin,
I hope you are well and having a great day.

Since yesterday I've noticed that when I enable the dual caption, any subtitle is being shown.
Could you kindly have a look at what it is happening?

I noticed this issue in a series named New Blood, ep 3.

size is getting weird

image

First of all! I am glad that someone worked on this. But I am having this problem on Netflix. Would be great if you can fix it. Thank you in advance.

Internationalize app

Ways to help out:

  • Adding a language. Translation files can be found in public/locales/.
  • Translating the extension description of the Chrome Web Store.
  • Fixing mistakes in translation files currently in the code base.

PRs are always welcome. If you're not familiar with git, please feel free to comment on this issue with translations and I will put them into the code base.

On YouTube, the additional captions are attached to the wrong DOM node.

Problem:
The temporary caption window that says "Spanish (autogenerated). Click <> for settings" has the class "caption-window", so the additional captions are attached to that window, which disappears in a second, so the additional captions also disappear.

Suggested fix:
In youtube.js, could you attach the captions to the DOM node with id="caption-window-1" or the DOM node that has the class "ytp-caption-window-bottom"?

v1.4.0 - Caption files with mismatched times work poorly

TED Talks work great on v1.4.0 because (I presume) they used one caption file and translated it into the other languages.

With videos with community-created captions, like https://www.youtube.com/watch?v=oXwNwVMsRi0 for example, DC doesn't work well.

Possible solutions

1. Use timer

There's no timer now in DC - it relies on the MutationObserver and adapter.getPlayerCurrentTime() to know when to add a caption to the DOM.

A timer would solve this issue but it would come with a lot of complexity. (eg. what happens when the video is paused?) I also don't believe it's good UX to have two sets of captions coming in and out at different times - it's likely distracting and it misses the point of using the second captions to understand the first.

2. Adjust caption times

I could translate the second captions to match the first.

Bring back Amazon Video support

I saw this note when I returned to Amazon to watch Diablo Gaurdian:

Sorry, Amazon Video support has been removed in v1.6.0.

Please open an issue if you'd like support added back in v2.

So, that is what I hope I am doing here--opening an issue.

{BTW, I love this program and find it extremely useful. Can't program but happy to provide financial support if it is helpful.}

Problem: Can't turn on/off captions in the middle of the episodes / Suggestion: Return and Advance video through captions

Hello, mikesteele! I'm an english teacher in Brazil and a big fan of your application, it helps a lot my students to gather new vocabulary as well as practicing their pronunciation while watching their favorite shows!

However, there seems to be a bug with the Turn on/off caption shortcut of the extension. Whenever we click Option/Alt + D, the captions provided by the app don't disappear/show up when we want. There's this activity in which I usually tell my students to watch the whole video with the native language caption off, and only turn it on whenever they see a word/sentence/term/expression they don't understand, just so they compare it with the text in portuguese to learn more vocabulary. For this activity, a keyboard shortcut like Alt + D is really, really helpful because it saves a lot of time, but it's not working...

Also, I would like to add a suggestion to the app, there could be "return and advance" buttons like these ( |< ) ( >| ) to advance and return the video through the subtitles, instead of clicking the arrows on the keyboard to return/advance 5/10 seconds on the show... Something like what I've seen on an application called "Simin", an Android double caption app for youtube videos. It could also be helpful because sometimes students lose track of the captions when characters speak too fast.

Prefer stored settings over default settings

The popup will read settings from DC and prefer those over those stored in settings. This is in case different tabs have different settings.

The issue is that there isn't a differentiation between default and user-defined DC settings. I imagine there could be a property created in the DC constructor (eg. settingsAreDefault) that is set to false when the settings are updated via user action. When DC sends its state to the popup, the popup should ignore the settings if they are default and prefer those in chrome.storage.

Current behavior

Open google.com and open the popup. Set second caption language to French. Open a new YouTube tab and open the popup. The popup says the second caption language is English.

Desired behavior

Open google.com and open the popup. Set second caption language to French. Open a new YouTube tab and open the popup. The popup says the second caption language is French.

Netflix - Pause - Subtitle - Disappear

Hello, guys.

I hope everything is fine with you.
First of all thank for this amazing e extension.

So.. basically when I'm watching Netflix, sometimes I have to stop/pause the video to read the subtitles but when I do it the subtitles (of the extension) disappears. Do you have any suggestions about it or a way to fix it?

Thank you.
Gustavo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.