1 | ;
|
2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7 | };
|
8 | var plugin_1 = require('./plugin');
|
9 | /**
|
10 | * @name VideoEditor
|
11 | * @description Edit videos using native device APIs
|
12 | *
|
13 | * @usage
|
14 | * ```
|
15 | * import {VideoEditor} from 'ionic-native';
|
16 | *
|
17 | * VideoEditor.transcodeVideo({
|
18 | * fileUri: '/path/to/input.mov',
|
19 | * outputFileName: 'output.mp4',
|
20 | * outputFileType: VideoEditor.OutputFileType.MPEG4
|
21 | * })
|
22 | * .then((fileUri: string) => console.log('video transcode success', fileUri))
|
23 | * .catch((error: any) => console.log('video transcode error', error));
|
24 | *
|
25 | * ```
|
26 | * @interfaces
|
27 | * TranscodeOptions
|
28 | * TrimOptions
|
29 | * CreateThumbnailOptions
|
30 | * GetVideoInfoOptions
|
31 | * VideoInfo
|
32 | */
|
33 | var VideoEditor = (function () {
|
34 | function VideoEditor() {
|
35 | }
|
36 | /**
|
37 | * Transcode a video
|
38 | * @param options {TranscodeOptions} Options
|
39 | * @returns {Promise<string>} Returns a promise that resolves to the path of the transcoded video
|
40 | */
|
41 | VideoEditor.transcodeVideo = function (options) { return; };
|
42 | /**
|
43 | * Trim a video
|
44 | * @param options {TrimOptions} Options
|
45 | * @returns {Promise<string>} Returns a promise that resolves to the path of the trimmed video
|
46 | */
|
47 | VideoEditor.trim = function (options) { return; };
|
48 | /**
|
49 | * Create a JPEG thumbnail from a video
|
50 | * @param options {CreateThumbnailOptions} Options
|
51 | * @returns {Promise<string>} Returns a promise that resolves to the path to the jpeg image on the device
|
52 | */
|
53 | VideoEditor.createThumbnail = function (options) { return; };
|
54 | /**
|
55 | * Get info on a video (width, height, orientation, duration, size, & bitrate)
|
56 | * @param options {GetVideoInfoOptions} Options
|
57 | * @returns {Promise<VideoInfo>} Returns a promise that resolves to an object containing info on the video
|
58 | */
|
59 | VideoEditor.getVideoInfo = function (options) { return; };
|
60 | VideoEditor.OptimizeForNetworkUse = {
|
61 | NO: 0,
|
62 | YES: 1
|
63 | };
|
64 | VideoEditor.OutputFileType = {
|
65 | M4V: 0,
|
66 | MPEG4: 1,
|
67 | M4A: 2,
|
68 | QUICK_TIME: 3
|
69 | };
|
70 | __decorate([
|
71 | plugin_1.Cordova({
|
72 | callbackOrder: 'reverse'
|
73 | })
|
74 | ], VideoEditor, "transcodeVideo", null);
|
75 | __decorate([
|
76 | plugin_1.Cordova({
|
77 | callbackOrder: 'reverse',
|
78 | platforms: ['iOS']
|
79 | })
|
80 | ], VideoEditor, "trim", null);
|
81 | __decorate([
|
82 | plugin_1.Cordova({
|
83 | callbackOrder: 'reverse'
|
84 | })
|
85 | ], VideoEditor, "createThumbnail", null);
|
86 | __decorate([
|
87 | plugin_1.Cordova({
|
88 | callbackOrder: 'reverse'
|
89 | })
|
90 | ], VideoEditor, "getVideoInfo", null);
|
91 | VideoEditor = __decorate([
|
92 | plugin_1.Plugin({
|
93 | pluginName: 'VideoEditor',
|
94 | plugin: 'cordova-plugin-video-editor',
|
95 | pluginRef: 'VideoEditor',
|
96 | repo: 'https://github.com/jbavari/cordova-plugin-video-editor',
|
97 | platforms: ['Android', 'iOS', 'Windows Phone 8']
|
98 | })
|
99 | ], VideoEditor);
|
100 | return VideoEditor;
|
101 | }());
|
102 | exports.VideoEditor = VideoEditor;
|
103 | //# sourceMappingURL=video-editor.js.map |
\ | No newline at end of file |