Play video from url in swift

import UIKit
import MediaPlayer
import AVKit
import AVFoundation

class PlayVideoViewController: ViewController {

    var strVideoUrl: String = ""
    var moviePlayer:MPMoviePlayerController!
    
    override func viewDidLoad() {
        super.viewDidLoad()

       // let url:NSURL = NSURL(string: "http://jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v")!
        let url:NSURL = NSURL(string: strVideoUrl)!
        moviePlayer = MPMoviePlayerController(contentURL: url as URL!)
        moviePlayer.view.frame = CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: SCREEN_HEIGHT - 64)
        moviePlayer.prepareToPlay()
        self.view.addSubview(moviePlayer.view)
        moviePlayer.scalingMode = .aspectFit
    }
}