Git Product home page Git Product logo

Comments (5)

noseglid avatar noseglid commented on June 3, 2024

Could you include more details how you start that video?

from locomote-video-player.

 avatar commented on June 3, 2024

The following is the process

bash-4.1$ cd /home/wang/locomote/

bash-4.1$ git clone https://github.com/AxisCommunications/locomote-video-player
Cloning into locomote-video-player...
remote: Counting objects: 2681, done.
remote: Total 2681 (delta 0), reused 0 (delta 0), pack-reused 2681
Receiving objects: 100% (2681/2681), 7.12 MiB | 262 KiB/s, done.
Resolving deltas: 100% (1375/1375), done.

bash-4.1$ ls
locomote-video-player
bash-4.1$ cd locomote-video-player/
bash-4.1$ ls
bower.json gulpfile.js LICENSE README.md VERSION
ext jslib package.json src

bash-4.1$ bower install locomote
bower cached git://github.com/AxisCommunications/locomote-video-player.git#0.5.0
bower validate 0.5.0 against git://github.com/AxisCommunications/locomote-video-player.git#*
bower install locomote#0.5.0

locomote#0.5.0 bower_components/locomote

bash-4.1$ ls
bower_components ext jslib package.json src
bower.json gulpfile.js LICENSE README.md VERSION

...
bash-4.1$ cd dist
bash-4.1$ ls
locomote.min.js Player.swf
bash-4.1$ pwd
/home/wang/locomote/locomote-video-player/bower_components/locomote/dist
bash-4.1$ vi player.html

Then, I copy the code in the README.md, and replace
"locomote.play('rtsp://server.com/stream');"
with
"locomote.play('http://vjs.zencdn.net/v/oceans.mp4');"

Finally, open the file in the Opera browser.
opera

Did I do something wrong?

from locomote-video-player.

noseglid avatar noseglid commented on June 3, 2024

Is Player.swf being loaded? You specify a path to it in the constructor of Locomote, then locomote attempts to load the swf from that url.

from locomote-video-player.

 avatar commented on June 3, 2024

The swf and the html page are in the same folder. the code:
var locomote = new Locomote('player', 'Player.swf');

Then I debugged the javascript code.
The first line of code is executed, but in the " locomote.js ":
.........................
window.LocomoteMap[tag] = this;
this.callbacks = [];
this.swfready = false;
this.__embed(tag, swf);
return this;
........................
the “swfready“ is set to false, so the next line
.......................
locomote.on('apiReady', function() {
........................
the callback function can't be called.
I change the code --------> this.swfready = true;
Then the callback is called.
but this line ------------>locomote.play('http://vjs.zencdn.net/v/oceans.mp4');
The corresponding code in the "locomote.js"
......................
play: function(url) {
this.e.play(url);
return this;
},
.....................
the "this.e.play(url)" has an error -----------> TypeError: this.e.play is not a function
the this.e doesn't has a function named play.

I'm not good at these things, so it's hard for me.
May you upload a demo that can be directly run?

from locomote-video-player.

noseglid avatar noseglid commented on June 3, 2024

Changing swfReady to true manually is not a good idea. It will be true when the swf has been successfully loaded. Check to make sure it is in the location you expect and that it is being loaded correctly in your browser.

from locomote-video-player.

Related Issues (20)

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.