Coder Social home page Coder Social logo

Comments (10)

caprica avatar caprica commented on September 26, 2024

--loop and --repeat are options for the command-line vlc. Of course they don't work with embedded libvlc.

Look at the Javadoc for MediaPlayer and you'll find an option to loop or autorepeat.

Otherwise, use the MediaListPlayer and set it to loop.

from vlcj.

vlcjava avatar vlcjava commented on September 26, 2024

However does not work in Linux. Mind it tested and failed.

from vlcj.

caprica avatar caprica commented on September 26, 2024

This is not Twitter. You're providing a narrative about your day rather than providing any useful information. What "does not work in Linux"? I exclusively use Linux for this project and I don't have any problems.

from vlcj.

vlcjava avatar vlcjava commented on September 26, 2024

@caprica

In Linux that setRepeat(true) is not working please below, where its working in Windows as i already explained in my above seal.

from vlcj.

caprica avatar caprica commented on September 26, 2024

If you explained above, then you did not explain clearly enough.

Anyway, there is absoultely no reason whatsoever why the auto-repeat functionality would work in Windows and not in Linux. The code is exactly the same.

Post some useful information and I'll try to help, but don't post any more screenshots.

from vlcj.

vlcjava avatar vlcjava commented on September 26, 2024

@caprica:

You are 100% correct, thank you. I just now realized it was my mistake or my distro mistake because yum -y install vlc always install default old version which is lower then VLC 2.0.0.

Which was causing the latest VLCJ as following:

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: This version of vlcj requires version 2.0.0 or later of libvlc, found too old version 1.1.13 The Luggage.

Therfore, i was using old VLCJ with old VLC. That old VLCJ and VLC, is not working with following code, but if i do command line --loop it works.


mediaPlayer.setRepeat(true);
mediaPlayer.setPlaySubItems(true);    
mediaPlayer.playMedia(mrl, options); 

from vlcj.

caprica avatar caprica commented on September 26, 2024

If "--loop" on the command-line works, you don't need mediaPlayer.setRepeat(true).

from vlcj.

RajChanchal avatar RajChanchal commented on September 26, 2024

mediaPlayer.setRepeat(true) doesn't work for me too on Ubuntu. The video runs for the first time and as soon the video ends, the file path seems like changed for the 2nd loop to run. Therefore, it says file not found! The path seems like appended with the original path.

from vlcj.

caprica avatar caprica commented on September 26, 2024

That is a different issue, so please create a new issue to track it.

from vlcj.

caprica avatar caprica commented on September 26, 2024

I just tested what @RajChanchal said, and it worked for me.

If you still think you have a problem, create a new issue, enable vlcj logging, post the logs in that issue and I'll take a look. Have a look in the logs in particular for "auto repeat mrl=".

from vlcj.

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.