Author Topic: Video Play Notification  (Read 20089 times)

lamrongol

  • Jr. Member
  • **
  • Posts: 47
>When i click the Stop button in musicbee a notification is sent to plugins "PlayStateChanged"

Yes if when playing music. But when MB start playing a video, PlayState change to "Stopped" and PlayState  doesn't change when clicking the Stop button or playing another video(when playing other music file, PlayState change "Playing"

I confirmed by below code.

  case NotificationType.PlayStateChanged:
      MessageBox.Show(mbApiInterface.Player_GetPlayState() + "");
      break;

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
I can do a simple solution of sending a stop notification when that button is clicked and will make the change for the next update.
But its not really a proper solution in that MusicBee doesnt know the play state of the video unless its controlling all playback actions or your plugin tells MusicBee the play state and MusicBee updates the player buttons (in which case i would need to add some more API calls).
Is the idea with your plugin that MusicBee controls the play state or is it a mixture of both MusicBee and the video player itself?
Last Edit: June 14, 2014, 10:10:23 AM by Steven

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313

lamrongol

  • Jr. Member
  • **
  • Posts: 47
Hmm...
For me, this newer version is sufficient.
And, it is equivalent  for current and newer version on the point that MusicBee doesn't know real state of video playing. So this change doesn't make MB worse, I think.

I think more complicated APIs will be confusing because knowing real state of video playing by external process is difficult(this plugin only knows  whether external process is running or not).
Last Edit: June 16, 2014, 03:37:18 PM by tfujikawa

jumo

  • Guest
Your solution works fine with VLC and videos should be played with that specialized application.

Stopping:
Stopping does not work, sometimes gets me two VLC processes. MB does not react on stopping or closing VLC. And stopping in MB does not have impact on VLC.
 
Tagging:
I have different music videos (mp4/mv4) of concerts with each containing serveral titels/tracks.
I tested around an saw, that mp4-tags are not read by MB.
If I have an similar mp3-file I put an cue sheet aside and can handle these tracks just as if they were single files.
Together with cue sheet files aside an m4v this also works within MB, except that the video always starts at the beginning.
I would appreciate when you add a start time to your interface to VLC, and probably also a play length.  I know that VLC can do at least start times.
I know that VLC also writes XSPF-Files with bookmarks, but that is a different story and a less easy editing variant to cue sheets.

lamrongol

  • Jr. Member
  • **
  • Posts: 47
I can't guarantee for complicated case but newer version of MusicBee and the plugin may work.
See below
http://getmusicbee.com/forum/index.php?topic=12419.msg82235#msg82235

lamrongol

  • Jr. Member
  • **
  • Posts: 47
@Steven

Sorry for too late response.

On latest version of MusicBee, this api doesn't work correctly.
1.public bool PlayVideo(string[] urls) function isn't called if previous played file is music.
   I found following pattern
   -Video -> Video: played
   -Video -> Music: played
   -Music -> Video: isn't played
2.When playing video, "play" button doesn't turn to "stop" button so users can't stop a video.

Would you please repair it when you have time?

Thanks,

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
i will look at this but not for a week or two

lamrongol

  • Jr. Member
  • **
  • Posts: 47
I found one more problem(not related video api).

Contrary to music, when rating playing video, "プロセスはファイルにアクセスできません。別のプロセスが使用中です"(Process can't access file. Another process is using) message shown and can't edit file.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
@Steven

Sorry for too late response.

On latest version of MusicBee, this api doesn't work correctly.
1.public bool PlayVideo(string[] urls) function isn't called if previous played file is music.
   I found following pattern
   -Video -> Video: played
   -Video -> Music: played
   -Music -> Video: isn't played
2.When playing video, "play" button doesn't turn to "stop" button so users can't stop a video.

Would you please repair it when you have time?

Thanks,
I have spent some time looking at this but i cant see why it would not work or even how its changed from v3.0
I dont think i can spend more time on this so will leave it unsolved.
for 2, i dont think that has ever been the case. Did you mean turn to "pause" ? you can hold the shift key down when pressing the play button to activate stop