google cast - ChromeCast Parse Segmented TTML -


hy!

i have ism file smooth streaming , playready. ism contains caption in segmented ttml format.

but ttml has new line character example: p8:br how can parse , replace theese characters /n (or whatever google chromecast can handle)?

so can see subtitle in 2 lines instead of one.

i know can streaminfo protocol.getstreaminfo(index), can after it?

update #1

we application other platforms , method there following. ttml variable contains caption of movie.

  ttml = ttml.replace("<p7:br />", "\n");   ttml = ttml.replace("<p8:br />", "\n");   ttml = ttml.replace("<p7:br/>", "\n");   ttml = ttml.replace("<p8:br/>", "\n");   ttml = ttml.replace("<br />", "\n");   ttml = ttml.replace("<br/>", "\n"); 

after new line characters replaced "\n", application started show current text depends on time (there eg. label @ bottom of movie.)

update #2

here sample dfxp:

   <p p7:region="speaker" p7:begin="00:04:31:21" p7:end="00:04:37:22"  xmlns:p7="http://www.w3.org/2006/10/ttaf1">talán mert nem vagy olyan okos?<p7:br />mert lassú felfogásod?</p>    <p p7:region="speaker" p7:begin="00:04:38:23" p7:end="00:04:42:11" xmlns:p7="http://www.w3.org/2006/10/ttaf1">eressz, különben<p7:br />nem állok jót magamért.</p>      <p p7:region="speaker" p7:begin="00:04:52:17" p7:end="00:04:55:10" xmlns:p7="http://www.w3.org/2006/10/ttaf1">mesélj nagypapáról.</p>    <p p7:region="speaker" p7:begin="00:05:08:18" p7:end="00:05:14:12"   xmlns:p7="http://www.w3.org/2006/10/ttaf1">a cukornádföldön voltam.<p7:br />akkor kapott el, mikor egyedül voltam.</p> 

at last line ot sample, device couldn't recognized characters , show subtitle following way:

a cukornádföldön voltam.akkor kapott el, mikor egyedül voltam.

instead of

a cukornádföldön voltam.

akkor kapott el, mikor egyedül voltam.

so similar operations of chromecast api. easier change characters, because chromecast can handle timing perfectly.

thank much!

there bug fixed in media player library soon; should address namespace issue. update post when fix released.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -