Trong xcode để play đc các file video ta phải import các thư viện #import <AVFoundation/AVFoundation.h> #import <AVFoundation/AVAsset.h> Để lấy đc độ dài của video ta sử dụng lớp CMTime selectedVideoUrl = [info objectForKey:UIImagePickerControllerMediaURL]; AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:selectedVideoUrl]; CMTime duration = playerItem.duration; float seconds = CMTimeGetSeconds(duration); Đây là thủ thuật nhỏ nhưng rất hữu ích cho newbie |
Lấy độ dài của video - get duration of video xcode
doanhkisi
Ý kiến bạn đọc
Tin tức khác
TreeView in ios
- 27/10/2015
Play Video Youtube with XCDYouTubeKit and other quality
- 23/3/2015
Animation and NSAutolayout ios 7, 8
- 26/1/2015
Check network connection internet - ios
- 18/6/2013
Hướng dẫn các tiêu chí đánh giá ứng dụng khi đưa lên Store - Apple Store Review Guidelines
- 20/3/2013
Các hàm toán học- math function objective c
- 18/2/2013
rotation Animation and move control in IOS
- 15/12/2012
định dạng chuỗi hiển thị-number format display string-objective C
- 4/12/2012
Các hàm cơ bản của NSString - objective C
- 4/12/2012
Thiết lập SCM trên Xcode
- 30/10/2012
Tin tiêu điểm
-
Play Video Youtube with XCDYouTubeKit and other quality (5,448)
-
Cơ bản Objective – C P3 (5,240)
-
Tìm hiểu cơ bản Objective C P2 (4,961)
-
Cơ bản về Objective-C P1 (4,737)
-
Các hàm cơ bản của NSString - objective C (4,646)
-
Animation and NSAutolayout ios 7, 8 (3,993)
-
Hướng dẫn các tiêu chí đánh giá ứng dụng khi đưa lên Store - Apple Store Review Guidelines (3,810)
-
Thiết lập SCM trên Xcode (3,484)
-
Check network connection internet - ios (3,082)
-
rotation Animation and move control in IOS (2,789)
Gallery
Text Links
Thiết kế logo chuyên nghiệp Insky
DAFABET
W88 w88b.com/dang-ky-tai-khoan-w88
W88
ca do bong da online
DAFABET
W88 w88b.com/dang-ky-tai-khoan-w88
W88
ca do bong da online
Tags
asp.net
JavaScript
Lập trình
Cơ sở dữ liệu
jquery
Csharp
Ajax
Thủ thuật
JavaScript
menu
Sql Server
Lập trình C#
WebService
stty
Sql
Phân trang
Rewrite
Mã hoá
Backup
Thủ thuật lập trình
Store procedure
Accordion
Validation
Store
Upload
Slide
jQueryPlugin
StoreProcedure
Regular Expression
Regex
android
Quick and snow
HTML5
WPF
WCF
Copyright © 2011 - 2012 vietshare.vn
by
phamkhuong102@gmail.com doanhkisi2315@gmail.com. All rights reserved.