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
+6-6Lines changed: 6 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,
@@ -151,7 +151,7 @@ You can also pass in an URL:
151
151
152
152
You can also pass in an `Asset`:
153
153
154
-
{% set myAsset = entry.someAsset.first() %}
154
+
{% set myAsset = entry.someAsset.one() %}
155
155
{% set transVideoUrl = craft.transcoder.getVideoUrl(myAsset, {
156
156
"videoFrameRate": 20,
157
157
"videoBitRate": "500k",
@@ -210,7 +210,7 @@ Transcoder will also automatically add video thumbnails in the Control Panel Ass
210
210
211
211
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
212
213
-
{% set myAsset = entry.someAsset.first() %}
213
+
{% set myAsset = entry.someAsset.one() %}
214
214
{% set videoOptions = {
215
215
"videoFrameRate": 60,
216
216
"videoBitRate": "1000k",
@@ -257,7 +257,7 @@ You can also pass in a URL:
257
257
258
258
You can also pass in an `Asset`:
259
259
260
-
{% set myAsset = entry.someAsset.first() %}
260
+
{% set myAsset = entry.someAsset.one() %}
261
261
{% set transVideoUrl = craft.transcoder.getVideoUrl(myAsset, {
262
262
"width": 300,
263
263
"height": 200,
@@ -316,7 +316,7 @@ You can also pass in a URL:
316
316
317
317
You can also pass in an `Asset`:
318
318
319
-
{% set myAsset = entry.someAsset.first() %}
319
+
{% set myAsset = entry.someAsset.one() %}
320
320
{% set fileInfo = craft.transcoder.getFileInfo(myAsset, true) %}
321
321
322
322
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