wxr
2020-03-05 0bdc0a135dbe31761b53f432ed34f347f0a4e36b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIKit;
using Foundation;
using Shared.IO;
 
namespace Shared
{
    /// <summary>
    /// Button 按键
    /// </summary>
    public class Video : View
    {
        //VitamioIOSBinding.VMediaPlayer player;
        /// <summary>
        ///  当前视图
        /// </summary>
        /// <value>The android button.</value>
        private UIView playUIView
        {
            get
            {
                return this.uiView as  UIView;
            }
            set
            {
                this.uiView = value;
            }
        }
 
        public Video()
        {
            this.playUIView = new UIView { };
            this.playUIView.Frame = new CoreGraphics.CGRect (0, 0, 1024, 1024);
            //this.player = VMediaPlayer.SharedInstance ();
            //player.SetupPlayerWithCarrierView (this.playUIView, new VdoDelegate());
            //player.SetVideoFillMode (FillMode.Stretch);
 
        }
 
        public void init()
        {
            //player.SetDataSource (new NSUrl (this.URL));
            //player.PrepareAsync ();
        }
 
        public void Start()
        {
            //player.Start ();
        }
 
        private string url;
 
        public string URL
        {
            get
            {
                return this.url;
            }
            set
            {
                this.url = value;
            }
        }
 
        public void Stop()
        {
            
        }
 
    }
 
//    public class VdoDelegate : VitamioIOSBinding.VMediaPlayerDelegate
//    {
//        public override void DidPrepared(VMediaPlayer player,NSObject obj)
//        {
//            //player.Start ();
//        }
//
//        public override void PlaybackCompleted(VMediaPlayer player,NSObject obj)
//        {
//            
//        }
//
//        public override void Error(VMediaPlayer player,NSObject obj)
//        {
//            
//        }
//    }
}