Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 28 | Rev 30 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 28 Rev 29
Línea 55... Línea 55...
55
              ]
55
              ]
Línea 56... Línea 56...
56
 
56
 
Línea 57... Línea 57...
57
              let assets = AVURLAsset(url: self.url!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers])
57
              let assets = AVURLAsset(url: self.url!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers])
-
 
58
        
-
 
59
        playerItem = AVPlayerItem(asset: assets)
-
 
60
        
-
 
61
        //
-
 
62
        NotificationCenter.default.addObserver(self, selector: #selector(playerDidFinishPlaying(n:)), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: playerItem)
-
 
63
        
-
 
64
        /*
-
 
65
        NotificationCenter.defaultCenter.addObserver(self, selector: "playerDidFinishPlaying:", name: AVPlayerItemDidPlayToEndTimeNotification, object: playerItem)
58
        
66
*/
Línea 59... Línea 67...
59
        playerItem = AVPlayerItem(asset: assets)
67
        
60
        let newTime : CMTime = CMTimeMakeWithSeconds(0, preferredTimescale:1)
68
        let newTime : CMTime = CMTimeMakeWithSeconds(0, preferredTimescale:1)
Línea 61... Línea 69...
61
        
69
        
Línea -... Línea 70...
-
 
70
        player = AVPlayer(playerItem: playerItem)
-
 
71
        player.seek(to: newTime)
62
        player = AVPlayer(playerItem: playerItem)
72
 
63
        player.seek(to: newTime)
73
    }
Línea 64... Línea 74...
64
 
74
    
Línea 159... Línea 169...
159
        
169
        
160
 
170
 
Línea -... Línea 171...
-
 
171
        appNavigation.pageActive = .home
161
        appNavigation.pageActive = .home
172
    }
-
 
173
    
-
 
174
    @objc @objc func playerDidFinishPlaying(n: NSNotification){
Línea -... Línea 175...
-
 
175
        
-
 
176
        self.isCompleted = true
Línea 162... Línea 177...
162
    }
177
        self.backToGallery()
Línea 163... Línea 178...
163
    
178