VideoPlayer icon indicating copy to clipboard operation
VideoPlayer copied to clipboard

TypeError: Cannot read property 'streamingMedia' of undefined

Open vkhazin opened this issue 10 years ago • 2 comments

After installing the plugin using command:

cordova plugin add com.hutchind.cordova.plugins.streamingmedia

and then calling it from AngularJs app from ng-click="playBack(movie.MovieID)"

    $scope.playBack = function (movieId) {
        //console.log(movieId);
        var url = 'http://<someurl>';
        window.plugins.streamingMedia.playVideo(url); //error
    }

Am I missing something? And also would it play m3u8 live stream as well?

vkhazin avatar Aug 07 '14 02:08 vkhazin

Did you ever figure this out?

alexhackney avatar Jun 02 '17 15:06 alexhackney

Sorry, I don't recall. Here is the code that I find in that project that worked on ios + android + emulators, but not in browser:

... if (angular.isUndefined(window.plugins)) { var msg = 'Sorry, playback is available on device only, media url: ' + movieUrl; $scope.dialogOkDisplay(msg); } else { window.plugins.streamingMedia.playVideo(movieUrl); } ...

vkhazin avatar Jun 02 '17 18:06 vkhazin