Sascha-L / WPF-MediaKit

Microsoft Public License
363 stars 115 forks source link

Issue reloading the source #86

Open miguelgomezmunoz opened 6 years ago

miguelgomezmunoz commented 6 years ago

I am using the lib in order to reproduce 12 videos and the first time I open all of them it works perfectly. However when I try to change the source of the videos in order to reproduce another 12 (or to load the original 12 again), I get errors. These errors are usually that the last two mediaurielements do not reproduce anything. Other times it just says xxxx.exe stop working.

Is there any way to correctly change the source? Now, I am just changing the mediaurilement.source.

Best regards.

xmedeko commented 6 years ago

It should be possible to change the video source. Try it with one video first and post errors.

miguelgomezmunoz commented 6 years ago

Hi, I have a layout with 12 videos. and I have tried the following

The code just change the source: mediaUriElement.Source = new Uri(...)

xmedeko commented 6 years ago

Should work, maybe some resource closing problem.

Does every MediaUriElement plays different video or do all of them have same source? What do you mean by "reload" - you just want to play the same file again, or different file?

miguelgomezmunoz commented 6 years ago

Every video plays a different file. With reload I mean that at the beginning I have: mediaUriElement ->file1 mediaUriElement ->file2 Then I click the button so: mediaUriElement ->file3 mediaUriElement ->file4 And if I click the button again it goes to the beginning: mediaUriElement ->file1 mediaUriElement ->file2

I have also tried reloading the same file and the same error happens.

xmedeko commented 6 years ago

What errors does it throws or writes in the debug console? If you report some bug, always provide the text of errors, full stack trace etc.

miguelgomezmunoz commented 6 years ago

I don't know how to explain it, the image just does not move, other times it is just black, other just says project stop working

xmedeko commented 5 years ago

@miguelgomezmunoz do you have still problem with that? Can you make an example in the Test Application and post it here (e.g. fork this project, or use https://gist.github.com/ to put changed files, etc.)