Skip to content

Commit 3b19f50

Browse files
author
Amir Tocker
committed
Add streaming_profile transformation parameter.
1 parent 19d4c8e commit 3b19f50

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

lib/utils.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/utils.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ exports.generate_transformation_string = (options) ->
313313
quality: "q"
314314
radius: "r"
315315
start_offset: "so"
316+
streaming_profile: "sp"
316317
video_codec: "vc"
317318
video_sampling: "vs"
318319
x: "x"

test/utils_spec.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,11 @@ describe "utils", ->
458458
cloudinary.config("responsive_width_transformation",{width: 'auto', crop: 'pad'})
459459
test_cloudinary_url("test", {width:100, height:100, crop:"crop", responsive_width:true}, "http://res.cloudinary.com/#{cloud_name}/image/upload/c_crop,h_100,w_100/c_pad,w_auto/test", {responsive: true})
460460

461+
462+
describe "streaming_profile", ->
463+
it 'should support streaming_profile in options', ->
464+
expect(utils.generate_transformation_string( streaming_profile: "somë-profilé")).to.eql("sp_somë-profilé")
465+
461466
describe "zoom", ->
462467
it "should support a decimal value", ->
463468
test_cloudinary_url("test", {zoom: 1.2}, "http://res.cloudinary.com/#{cloud_name}/image/upload/z_1.2/test", {})

0 commit comments

Comments
 (0)