zoukankan      html  css  js  c++  java
  • MediaPlayer 播放百度歌曲

    WPF中的Mediaplayer就是强大呀,只要有歌曲链接就能播放 [csharp] public partial class MainWindow : Window     {         MediaPlayer player = new MediaPlayer();         public MainWindow()         {             InitializeComponent();             MusicUrl.Text = "<a href="http://zhangmenshiting2.baidu.com/data2/music/5213846/5213846.mp3?xcode=f4ff3ed1ddf627aa674e52aa74965028&mid=0.66660684002912">http://zhangmenshiting2.baidu.com/data2/music/5213846/5213846.mp3?xcode=f4ff3ed1ddf627aa674e52aa74965028&mid=0.66660684002912</a>";         }         private void Button_Click(object sender, RoutedEventArgs e)         {             player.Open(new Uri(MusicUrl.Text.ToString()));             player.MediaOpened+=new EventHandler(player_MediaOpened);         }         private void player_MediaOpened(object sender, EventArgs e)         {             player.Play();         }     } [/csharp]

  • 相关阅读:
    w3c标准
    HTML+CSS理解
    Mybatis源码日记(一)
    Sqlmap学习笔记(三)
    EasyExcel读取跨行单元格数据为空的解决办法
    Sqlmap学习笔记(二)
    Sqlmap学习笔记(一)
    Linux安装运行Typora
    Kafka环境搭建
    Mysql主从配置
  • 原文地址:https://www.cnblogs.com/HelloMyWorld/p/2657888.html
Copyright © 2011-2022 走看看