5 Replies Latest reply on Jun 30, 2014 12:53 AM by Timmiiee

    add subtitles with track to a video object in ?

    Timmiiee

      With the new array video object in Edge Animate CC 2014,  is there an easy way to add a subtitle (maybe with 'track')?

       

      sym.$("Name_video")[0]..........

       

       

      In the previous Edge Animate I created a videoholder in a symbol, and added code like below, but that seems a bit cumbersome now:

       

      var video_FR = sym.$("VidHoldCedric"); 

      $(video_FR).html('<video width="1920" height="1080" id="VideoFR" allowfullscreen="true" autoplay><source src="images/_Video/Cedric.mp4" type = "video/mp4" />  <track label="English Captions" srclang="en" kind="subtitles" src="images/_Subs/EN/Cedric_EN_DEF.vtt" type="text/vtt" default=""><track/> </video>');

        • 1. Re: add subtitles with track to a video object in ?
          jbowden Adobe Employee

          Hi there,

           

          Sorry, but there's no way to do this through the user interface in Animate CC 2014, apart from adding a track tag and link to the subtitles source file via Javascript in an event handler.

           

          If it's any consolation, the presence of video in the app itself and the smaller amount of code required to do this should make the task easier than it was in prior versions.

           

          Regards,

          Joe

          1 person found this helpful
          • 2. Re: add subtitles with track to a video object in ?
            Timmiiee Level 1

            Thank you for you answer, Joe.

            Could you maybe give me a hint in the right direction of how to add a track tag to the video array object?

            Since it is not inside the <video> tag, I wouldn't really know how to add the subtitle.

            Or should I not use the newly built-in video functionalities to add subtitles?

            • 3. Re: add subtitles with track to a video object in ?
              jbowden Adobe Employee

              Hi Timmiiee,

               

              I'll see if I can whip up a quick example for you. Stay tuned.

               

              Thanks,

              Joe

              • 4. Re: add subtitles with track to a video object in ?
                jbowden Adobe Employee

                Sorry for the delay. So using your example above, you could add code like this to your compositionReady event:

                 

                sym.$("your_video_element").html('<track label="English Captions" srclang="en" kind="subtitles" src="images/_Subs/EN/Cedric_EN_DEF.vtt" type="text/vtt" default />')

                 

                You don't use the array designation for the video element as that only applies to properties and methods that directly affect the media of the video element, such as play, pause, currentTime, etc.

                 

                hth,

                Joe

                1 person found this helpful
                • 5. Re: add subtitles with track to a video object in ?
                  Timmiiee Level 1

                  Thank you for the example.

                  For a project with 7 different languages I want to show the corresponding srt when clicking on a button language, so cannot do it in the compositionReady.

                  It seems that the introduction of video-support in Edge Animate didn't change the workflow if one wishes to use subtitles, which in Europe is quite often the case.

                  I wouldn't mind a little subtitle array button in the next version of Edge Animate ;-)