Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

how can i play video with url in a view in swift

let url = URL(string:myURL)

player = AVPlayer(url: url!)

avpController.player = player

avpController.view.frame.size.height = videoView.frame.size.height

avpController.view.frame.size.width = videoView.frame.size.width

self.videoView.addSubview(avpController.view)
Comment

PREVIOUS NEXT
Code Example
Swift :: swift url encode string 
Swift :: swift how to animate constraint change 
Swift :: alert swiftui 
Swift :: power number in swift 
Swift :: get keyboard height swift 
Swift :: swift qrcode scanner 
Swift :: dismiss two view controllers at once swift 
Swift :: how to loop swift 
Swift :: swift center label 
Swift :: ios swift create new background thread 
Swift :: swift navigation bar title color 
Swift :: swift add programmatically constraint to view 
Swift :: add navigation bar button swiftui 
Swift :: swift edit constraint programmatically 
Swift :: swift 5 make image fit uiimageview 
Swift :: swift file size from url 
Swift :: string interpolation swift 5 
Swift :: swiftui textfield focus 
Swift :: save file with % swift 
Swift :: swift int to int32 
Swift :: swift get keys from dictionary 
Swift :: swiftui refresh view 
Swift :: Swift nal Within The Same Module 
Swift :: Log httpurlresponse swift 
Swift :: Access Array Elements Using Swift Range 
Swift :: swift UIColor to String 
Swift :: how to switch tabs in xcode 
Swift :: how to change the tint color of tab bar on storyboard swift 
Swift :: Swift Closed Range 
Swift :: Type Constraints in Swift Generics 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =