Skip to content

Commit 25ab4ff

Browse files
committed
Added all available regions to ZencoderRegion enum
For a list of available regions see: https://app.zencoder.com/docs/api/encoding/job/region
1 parent a9504ca commit 25ab4ff

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/main/java/de/bitzeche/video/transcoding/zencoder/enums/ZencoderRegion.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,18 @@
1717
package de.bitzeche.video.transcoding.zencoder.enums;
1818

1919
public enum ZencoderRegion {
20-
EUROPE, US, ASIA;
20+
US("us"), EUROPE("europe"), ASIA("asia"), SA("sa"), AUSTRALIA("australia"),
21+
VIRGINIA("us-n-virginia"), OREGON("us-oregon"), CALIFORNIA("us-n-california"),
22+
DUBLIN("eu-dublin"), SINGAPORE("asia-singapore"), TOKYO("asia-tokyo"),
23+
SAOPAULO("sa-saopaulo"), SYDNEY("australia-sydney");
24+
25+
private final String regionCode;
26+
27+
private ZencoderRegion(String code) {
28+
this.regionCode = code;
29+
}
30+
31+
public String getRegionCode() {
32+
return regionCode;
33+
}
2134
}

src/main/java/de/bitzeche/video/transcoding/zencoder/job/ZencoderJob.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public Document createXML() throws ParserConfigurationException {
9191
// region
9292
if (this.zencoderRegion != null) {
9393
Node region = document.createElement("region");
94-
region.setTextContent(this.zencoderRegion.name().toLowerCase());
94+
region.setTextContent(this.zencoderRegion.getRegionCode());
9595
root.appendChild(region);
9696
}
9797

0 commit comments

Comments
 (0)