You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/Using.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ You can also pass in an URL:
22
22
23
23
You can also pass in an `Asset`:
24
24
25
-
{% set myAsset = entry.someAsset.first() %}
25
+
{% set myAsset = entry.someAsset.one() %}
26
26
{% set transVideoUrl = craft.transcoder.getVideoUrl(myAsset, {
27
27
"videoFrameRate": 20,
28
28
"videoBitRate": "500k",
@@ -97,7 +97,7 @@ You can also pass in a URL:
97
97
98
98
You can also pass in an `Asset`:
99
99
100
-
{% set myAsset = entry.someAsset.first() %}
100
+
{% set myAsset = entry.someAsset.one() %}
101
101
{% set transAudioUrl = craft.transcoder.getAudioUrl(myAsset, {
102
102
"audioBitRate": "64k",
103
103
"audioSampleRate": 22050,
@@ -113,6 +113,8 @@ In the array you pass in, the default values are used if the key/value pair does
113
113
"audioBitRate" => "128k",
114
114
"audioSampleRate" => "44100",
115
115
"audioChannels" => "2",
116
+
'synchronous' => false,
117
+
'stripMetadata' => false,
116
118
}
117
119
118
120
These default values come from the `config.php` file.
@@ -151,7 +153,7 @@ You can also pass in an URL:
151
153
152
154
You can also pass in an `Asset`:
153
155
154
-
{% set myAsset = entry.someAsset.first() %}
156
+
{% set myAsset = entry.someAsset.one() %}
155
157
{% set transVideoUrl = craft.transcoder.getVideoUrl(myAsset, {
156
158
"videoFrameRate": 20,
157
159
"videoBitRate": "500k",
@@ -210,7 +212,7 @@ Transcoder will also automatically add video thumbnails in the Control Panel Ass
210
212
211
213
Transcoding of video/audio files can take quite a bit of time, so Transcoder provides you with a way to get the status of any currently running transcoding operation via `craft.transcoder.getVideoProgressUrl()` or `craft.transcoder.getAudioProgressUrl()`. For example:
212
214
213
-
{% set myAsset = entry.someAsset.first() %}
215
+
{% set myAsset = entry.someAsset.one() %}
214
216
{% set videoOptions = {
215
217
"videoFrameRate": 60,
216
218
"videoBitRate": "1000k",
@@ -257,7 +259,7 @@ You can also pass in a URL:
257
259
258
260
You can also pass in an `Asset`:
259
261
260
-
{% set myAsset = entry.someAsset.first() %}
262
+
{% set myAsset = entry.someAsset.one() %}
261
263
{% set transVideoUrl = craft.transcoder.getVideoUrl(myAsset, {
262
264
"width": 300,
263
265
"height": 200,
@@ -316,7 +318,7 @@ You can also pass in a URL:
316
318
317
319
You can also pass in an `Asset`:
318
320
319
-
{% set myAsset = entry.someAsset.first() %}
321
+
{% set myAsset = entry.someAsset.one() %}
320
322
{% set fileInfo = craft.transcoder.getFileInfo(myAsset, true) %}
321
323
322
324
By passing in `true` as the second argument, we get just a summary of the video/audio file information in an array:
0 commit comments