SpeedRatio & MediaTimeline

烂漫一生 提交于 2019-12-13 03:48:08

问题


I'm trying to be able to affect SpeedRatio on a MediaElement whilst having the media play in a continous loop.

This is possible through code behind; I can reset the position of the media once it has ended, but that creates a seam in the playback.

For seamless playback, I use a MediaTimeline, but when I use I media timeline, I can't change the SpeedRatio.

Has anyone got a different approach to looping playback in a mediaElement, or handling SpeedRatio?

UPDATE:

If I stop the timeline, change the timeline's SpeedRatio, I can produce the result I'm looking for. The only remaining problem is getting the timeline to start from the same position that it was stopped at. Pausing the timeline does not allow for the SpeedRatio to be changed.

I still welcome any alternatives.


回答1:


My MediaUriElement in my open-source project has a "Loop" property that can provide seemless looping. Get it from the source because it's the newest.




回答2:


The only solution I've found for this is to use XNA to control audio. It's got a lot more responsiveness.



来源:https://stackoverflow.com/questions/2276699/speedratio-mediatimeline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!