2016-12-02 10 views

答えて

0

Apple documentをお読みください。サポート

ビデオ・テクノロジーズは、MOV、M4VMP43GP

ので.WMVファイルは再生できませんです。

あなたは同じElevan player

+0

返信いただきありがとうございます。 mp4形式に変換する以外は他にも利用可能なオプションはありますか? –

+0

@Rakeshそのソースコードに実装されています。それに従ってください。ありがとうございました – Saranjith

+0

あなたのクリア – Saranjith

0

WMVファイルが再生できないためsource code

iTunesのリンクを見て、この中にはあまり興味があれば。

しかし、バックグラウンドでwmvをmp4に変換して再生することができます。

以下は変換コードです。

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
NSString *documentsDirectory = [paths objectAtIndex:0]; 
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"MyVideo.mp4"]; 
NSURL *outputURL = [NSURL fileURLWithPath:filePath]; 

[self convertVideoToLowQuailtyWithInputURL:localUrl outputURL:outputURL handler:^(AVAssetExportSession *exportSession) 
{ 
    if (exportSession.status == AVAssetExportSessionStatusCompleted) { 
     // Video conversation completed 
    }   
}]; 

- (void)convertVideoToLowQuailtyWithInputURL:(NSURL*)inputURL outputURL:(NSURL*)outputURL handler:(void (^)(AVAssetExportSession*))handler { 
    [[NSFileManager defaultManager] removeItemAtURL:outputURL error:nil]; 
    AVURLAsset *asset = [AVURLAsset URLAssetWithURL:inputURL options:nil]; 
    AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:asset presetName:AVAssetExportPresetPassthrough]; 
    exportSession.outputURL = outputURL; 
    exportSession.outputFileType = AVFileTypeMPEG4; 
    [exportSession exportAsynchronouslyWithCompletionHandler:^(void) { 
     handler(exportSession); 
    }]; 
} 
関連する問題