Skip to content

Commit

Permalink
v2.9.0 (#217)
Browse files Browse the repository at this point in the history
### Improvements

* Allow ability to override OS data values. (#216) Backend support for this feature is coming soon!
* Update to MuxCore `7.3.0`

### MuxCore Changes

* Support for overriding OS data values
  • Loading branch information
daytime-em committed Jul 22, 2022
1 parent 0c7756f commit bb050ac
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 13 deletions.
2 changes: 1 addition & 1 deletion MuxExoPlayer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
defaultConfig {
minSdkVersion project.ext.minSdkVersion
targetSdkVersion project.ext.targetSdkVersion
versionCode 38
versionCode 39
versionName project.ext.versionName
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,13 +468,42 @@ public CustomerData getCustomerData() {
}

/**
* Value used here will be reported to the backend as a device name. If this method is not used
* then SDK will auto detect the device name. State will be reseted on every new view or video.
* @param deviceName, name to be used instead of auto detected value.
* User can choose a device name to be sent to the backend.
* @param deviceName value to be used as a device name.
*/
public void overwriteDeviceMetadata(String deviceName) {
public void overwriteDeviceName(String deviceName) {
if (muxDevice != null) {
muxDevice.overwriteDeviceMetadata(deviceName);
muxDevice.overwriteDeviceName(deviceName);
}
}

/**
* User can choose a family name to be sent to the backend.
* @param osFamilyName value to be used as a family name.
*/
public void overwriteOsFamilyName(String osFamilyName) {
if (muxDevice != null) {
muxDevice.overwriteOsFamilyName(osFamilyName);
}
}

/**
* User can choose a os version to be sent to the backend.
* @param osVersion to be used
*/
public void overwriteOsVersion(String osVersion) {
if (muxDevice != null) {
muxDevice.overwriteOsFamilyName(osVersion);
}
}

/**
* User can choose a manufacturer to be sent to the backend.
* @param manufacturer to be used.
*/
public void overwriteManufacturer(String manufacturer) {
if (muxDevice != null) {
muxDevice.overwriteOsFamilyName(manufacturer);
}
}

Expand Down Expand Up @@ -1205,7 +1234,10 @@ static class MuxDevice implements IDevice {
/**
* Use this value instead of auto detected name in case the value is different then null.
*/
protected String metadataDeviceName = null;
protected String overwrittenDeviceName = null;
protected String overwrittenOsFamilyName = null;
protected String overwrittenOsVersion = null;
protected String overwrittenManufacturer = null;

/**
* Basic constructor.
Expand Down Expand Up @@ -1233,8 +1265,35 @@ static class MuxDevice implements IDevice {
}
}

public void overwriteDeviceMetadata(String deviceName) {
metadataDeviceName = deviceName;
/**
* User can choose a device name to be sent to the backend
*/
public void overwriteDeviceName(String deviceName) {
overwrittenDeviceName = deviceName;
}

/**
* User can choose a family name to be sent to the backend.
* @param osFamily value to be used as a family name
*/
public void overwriteOsFamilyName(String osFamily) {
overwrittenOsFamilyName = osFamily;
}

/**
* User can choose a os version to be sent to the backend.
* @param osVersion to be used
*/
public void overwriteOsVersion(String osVersion) {
overwrittenOsVersion = osVersion;
}

/**
* User can choose a manufacturer to be sent to the backend.
* @param manufacturer to be used.
*/
public void overwriteManufacturer(String manufacturer) {
overwrittenManufacturer = manufacturer;
}

@Override
Expand All @@ -1247,24 +1306,41 @@ public String getOSFamily() {
return "Android";
}

@Override
public String getMuxOSFamily() {
return overwrittenOsFamilyName;
}

@Override
public String getOSVersion() {
return Build.VERSION.RELEASE + " (" + Build.VERSION.SDK_INT + ")";
}

@Override
public String getMuxOSVersion() {
return overwrittenOsVersion;
}

@Override
public String getManufacturer() {
return Build.MANUFACTURER;
}

@Override
public String getMuxManufacturer() {
return overwrittenManufacturer;
}

@Override
public String getModelName() {
if (metadataDeviceName != null) {
return metadataDeviceName;
}
return Build.MODEL;
}

@Override
public String getMuxModelName() {
return overwrittenDeviceName;
}

@Override
public String getPlayerVersion() {
return ExoPlayerLibraryInfo.VERSION;
Expand Down
22 changes: 22 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
# Release notes
## 2.9.0
### Improvements
* Allow ability to override OS data values. (#216)
* Update to MuxCore `7.3.0`

### MuxCore Changes
* Support for overriding OS data values

## v2.8.0
### Improvements
* Add support for Custom Data Domains
* Add support for manually tracking if a view was played automatically
* Update to MuxCore `v7.2.0` (#211)

### Fixes
* Fix Issue with HLS/DASH CDN tracking (#211)

### MuxCore Changes
* Custom Beacon Collection Domains
* Add Autoplay flag on CustomerPlayerData
* Fix serialization strategy for complex objects in beacons

## 2.7.2
### Fixes
* Fix Build/Crash Issues When Used With Minimal/Custom ExoPlayers (#208)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ allprojects {
releaseVersion = 'r2.1.1'
releaseWebsite = 'https://github.com/google/ExoPlayer'

muxCoreVersion = "7.2.0"
muxCoreVersion = "7.3.0"
}
}

Expand Down

0 comments on commit bb050ac

Please sign in to comment.