C# Media Player Player.playState播放状态

Media Player Player.playState获取播放状态事件

Value State Description

0 Undefined Windows Media Player is in an undefined state.(未定义)

1 Stopped Playback of the current media item is stopped.(停止)

2 Paused Playback of the current media item is paused. When a media item is paused, resuming playback begins from the same location.(停留)

3 Playing The current media item is playing.(播放)

4 ScanForward The current media item is fast forwarding.

5 ScanReverse The current media item is fast rewinding.

6 Buffering The current media item is getting additional data from the server.(转换)

7 Waiting Connection is established, but the server is not sending data. Waiting for session to begin.(暂停)

8 MediaEnded Media item has completed playback. (播放结束)

9 Transitioning Preparing new media item.

10 Ready Ready to begin playing.(准备就绪)

11 Reconnecting Reconnecting to stream.(重新连接)

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1、基本属性  URL 指定媒体位置,本机或网络地址 例如:axWindowsMediaPlayer1.URL = @"f:\aa.mp3"; uiMode 播放器界面模式,可为Full, Mini, None, Invisible ;Full:有下面的控制条; None:只有播放部份没有控制条 例如:axWindowsMediaPlayer1.uiMode = "Invisible"; playState 播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪 enableContextMenu 启用/禁用右键菜单 fullScreen 是否全屏显示 stretchToFit 非全屏状态时是否伸展到最佳大小 2、播放器基本控制 Ctlcontrols.play(); 播放 Ctlcontrols.pause(); 暂停 Ctlcontrols.stop(); 停止 Ctlcontrols.currentPosition 当前进度 Ctlcontrols.currentPositionString 当前进度,字符串格式。如“00:23” Ctlcontrols.fastForward(); 快进 Ctlcontrols.fastReverse(); 快退 Ctlcontrols.next(); 下一曲 Ctlcontrols.previous(); 上一曲 3、播放器基本设置 settings.volume 音量,0-100 settings.balance 声道,通过它应该可以进行立体声、左声道、右声道的控制。 settings.autoStart 是否自动播放 settings.mute 是否静音 settings.playCount 播放次数 settings.rate 播放速度 4、当前媒体属性 currentMedia.duration 媒体总长度 currentMedia.durationString 媒体总长度,字符串格式。如“03:24” currentMedia.getItemInfo(const string) 获取当前媒体信息"Title"=媒体标题,"Author"=艺术家,"Copyright"=版权信息,"Description"=媒体内容描述,"Duration"=持续时间(秒),"FileSize"=文件大小,"FileType"=文件类型,"sourceURL"=原始地址 currentMedia.setItemInfo(const string) 通过属性名设置媒体信息 currentMedia.name 同 currentMedia.getItemInfo("Title")
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值