Type 'ViewController' does not conform to protocol 'MPMediaPlayback'Show Navigationbar without UINavigationControllerInstantiate and Present a viewController in SwiftSwift - NSIndex forRow inSection InitializerHow to detect tableView cell touched or clicked in swiftSwift 2 iOS 9 animation disappears after button text changedMPMoviePlayerController and MPMediaPlayback.currentPlaybackRateUIColor: Is grayscale value a property?Expand and Collapse tableview cellscall by touching cell in SwiftHow to fetch cookies values from WKWebView in Swift 4?

What does "2 fingers to Scotland" mean in Peter Grant's statement about Johnson not listening to the SNP's Westminster leader speeches?

Equivalent of !$A.util.isEmpty() in LWC

What is self hosted version control system?

Instant coffee melts like chocolate

Is there a Ukrainian transcript of Trump's controversial July 25 call to President Zelensky?

What does "T.O." mean?

How should I conceal gaps between laminate flooring and wall trim?

Is the SCK line in I2C unidirectional or bidirectional?

Totally Blind Chess

Teleportation is invented but it has nasty side-effects % of the time, how will that affect usage of the technology?

In what way were Renaissance battles like chess matches?

Fast symmetric key cryptography class

What is the equivalent of "if you say so" in German?

If I am just replacing the car engine, do I need to replace the odometer as well?

Disable memory refresh on Z80

How do I prevent against authentication side-channel attacks?

English equivalent of the Malayalam saying "don't stab/poke the dead body"?

Change collation on partition column (SQL Server 2017)

Is it worth delving deep outside my field to revise a paper?

Trying to find a short story about the representative of a city discovering the "primitive" folk are actually more advanced

What would an inclusive curriculum look like in a computer science course?

Can Alter Self be used to enter an enemy's body and destroy it from the inside?

What is the impact of divergent tectonic plates on old mountain ranges?

How can you castle legally in Chess960 when the castling rook is on the king's destination square?



Type 'ViewController' does not conform to protocol 'MPMediaPlayback'


Show Navigationbar without UINavigationControllerInstantiate and Present a viewController in SwiftSwift - NSIndex forRow inSection InitializerHow to detect tableView cell touched or clicked in swiftSwift 2 iOS 9 animation disappears after button text changedMPMoviePlayerController and MPMediaPlayback.currentPlaybackRateUIColor: Is grayscale value a property?Expand and Collapse tableview cellscall by touching cell in SwiftHow to fetch cookies values from WKWebView in Swift 4?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2

















I got this error message when trying to develop video player.




/Users/MNurdin/Documents/iOS/SwiftVideoPlayer/SwiftVideoPlayer/ViewController.swift:12:1:
Type 'ViewController' does not conform to protocol 'MPMediaPlayback'




My code



import UIKit
import MediaPlayer

class ViewController: UIViewController, MPMediaPlayback //error message here

var isPreparedToPlay: Bool = true
var currentPlaybackRate: Float = 0.0
var currentPlaybackTime: NSTimeInterval = 0.0

override func viewDidLoad()
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.


func play()



func pause()



func stop()



func prepareToPlay()



func beginSeekingBackward()



func beginSeekingForward()



func endSeeking()






What am I missing here?



Source code: https://github.com/datomnurdin/SwiftVideoPlayer



Reference: https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMediaPlayback_protocol/index.html#//apple_ref/occ/intfp/MPMediaPlayback/currentPlaybackTime










share|improve this question


































    2

















    I got this error message when trying to develop video player.




    /Users/MNurdin/Documents/iOS/SwiftVideoPlayer/SwiftVideoPlayer/ViewController.swift:12:1:
    Type 'ViewController' does not conform to protocol 'MPMediaPlayback'




    My code



    import UIKit
    import MediaPlayer

    class ViewController: UIViewController, MPMediaPlayback //error message here

    var isPreparedToPlay: Bool = true
    var currentPlaybackRate: Float = 0.0
    var currentPlaybackTime: NSTimeInterval = 0.0

    override func viewDidLoad()
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.


    func play()



    func pause()



    func stop()



    func prepareToPlay()



    func beginSeekingBackward()



    func beginSeekingForward()



    func endSeeking()






    What am I missing here?



    Source code: https://github.com/datomnurdin/SwiftVideoPlayer



    Reference: https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMediaPlayback_protocol/index.html#//apple_ref/occ/intfp/MPMediaPlayback/currentPlaybackTime










    share|improve this question






























      2












      2








      2








      I got this error message when trying to develop video player.




      /Users/MNurdin/Documents/iOS/SwiftVideoPlayer/SwiftVideoPlayer/ViewController.swift:12:1:
      Type 'ViewController' does not conform to protocol 'MPMediaPlayback'




      My code



      import UIKit
      import MediaPlayer

      class ViewController: UIViewController, MPMediaPlayback //error message here

      var isPreparedToPlay: Bool = true
      var currentPlaybackRate: Float = 0.0
      var currentPlaybackTime: NSTimeInterval = 0.0

      override func viewDidLoad()
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.


      func play()



      func pause()



      func stop()



      func prepareToPlay()



      func beginSeekingBackward()



      func beginSeekingForward()



      func endSeeking()






      What am I missing here?



      Source code: https://github.com/datomnurdin/SwiftVideoPlayer



      Reference: https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMediaPlayback_protocol/index.html#//apple_ref/occ/intfp/MPMediaPlayback/currentPlaybackTime










      share|improve this question

















      I got this error message when trying to develop video player.




      /Users/MNurdin/Documents/iOS/SwiftVideoPlayer/SwiftVideoPlayer/ViewController.swift:12:1:
      Type 'ViewController' does not conform to protocol 'MPMediaPlayback'




      My code



      import UIKit
      import MediaPlayer

      class ViewController: UIViewController, MPMediaPlayback //error message here

      var isPreparedToPlay: Bool = true
      var currentPlaybackRate: Float = 0.0
      var currentPlaybackTime: NSTimeInterval = 0.0

      override func viewDidLoad()
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.


      func play()



      func pause()



      func stop()



      func prepareToPlay()



      func beginSeekingBackward()



      func beginSeekingForward()



      func endSeeking()






      What am I missing here?



      Source code: https://github.com/datomnurdin/SwiftVideoPlayer



      Reference: https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMediaPlayback_protocol/index.html#//apple_ref/occ/intfp/MPMediaPlayback/currentPlaybackTime







      ios swift uiviewcontroller






      share|improve this question
















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 21:30









      halfer

      15.2k7 gold badges64 silver badges130 bronze badges




      15.2k7 gold badges64 silver badges130 bronze badges










      asked Jun 30 '15 at 9:56









      Mohammad NurdinMohammad Nurdin

      13.8k32 gold badges101 silver badges252 bronze badges




      13.8k32 gold badges101 silver badges252 bronze badges

























          0






          active

          oldest

          votes













          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31135084%2ftype-viewcontroller-does-not-conform-to-protocol-mpmediaplayback%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31135084%2ftype-viewcontroller-does-not-conform-to-protocol-mpmediaplayback%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript