Start a new topic
Solved

Problem when use viblast/api

Sorry for my poor english.


i try use this code below, but i received this "Uncaught SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin '' in a call to 'postMessage'." when i play stream.


Any Idea?


best regards, 

AC 



.....

<script src="assets/v1/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>

<script src="assets/v1/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>

<script src="assets/v1/plugins/videojs/js/video.js" type="text/javascript"></script>


<!-- and only then viblast.js. -->  

<!-- script src="assets/v1/plugins/viblast/viblast.js" type="text/javascript"></script-->

<script src="../viblast.js"></script>

....

    myurl = "//cdn3.viblast.com/streams/hls/airshow/playlist.m3u8";

    myurl = "";

    var advideo = '<video id="'+ idexternor +'" class="video-js vjs-default-skin" \n' +  

    'width="100%" height="100%" \n' +

    mautoplay + " \n" +

    " data-setup='{}' \n" +

    ' data-viblast-log="warning" \n' +

    ' data-viblast="true" \n' +

    ' data-viblast-key="N8FjNTQ3NDdhZqZhNGI5NWU5ZTI="> \n' + 

    ' <source src="'+myurl+'" type="application/x-mpegURL" />\n ' +

    "</video>\n";

      

   $('#moldura'+i).append( advideo );

   var video = videojs(idexternor/*+'_flash_api'*/);

   $("#"+ idexternor + " .vjs-poster").css( 'background-image', imgfundo).show();

   if (video) {

// viblast("#"+idexternor).setup({

// key: 'N8FjNTQ3NDdhZqZhNGI5NWU5ZTI=',

// stream: myurl,

// autoplay: true

// });

     myurl = "//cdn3.viblast.com/streams/hls/airshow/playlist.m3u8";

     videojs("#"+idexternor,{});

     videojs("#"+idexternor).src(myurl);

     //viblast("#"+idexternor).start();

.....



Hi Stefan, 

Sorry, i back of vacation.

try this url.    

http://newyork.pi01.com.br:1880

username: viblast     password: senha


best regards,

antonio

Hi Antonio,

1) Could you remove JWPlayer from your main page?

2) viblast.js should be loaded via <script> tag.


Please, let me know the result.


Best regards,

Stefan


stefan,


it's work very well. thanks a lot.


best regards,

ac

Hi Antonio,

Do you have full html example/public accessible/?


Best regards,

Stefan


Login to post a comment