String licenseUrl = "Enter the URL of the License you purchased";String licenseKey = "Enter the Key of the License you purchased"TXLiveBase.getInstance().setLicence(context, licenseUrl, licenseKey);
NSString *licenseURL = "Enter the URL of the License you purchased";NSString *licenseKey = "Enter the Key of the License you purchased"[TXLiveBase setLicenceURL:licenseURL key:licenseKey];
@Overridepublic void onPlayEvent(TXVodPlayer player, int event, Bundle param) {if (event == TXLiveConstants.PLAY_EVT_VOD_PLAY_PREPARED) {// Enable the terminal VR panoramic video monocular mode. If you need to enable the binocular mode, set the value to '12'.mVodPlayer.setStringOption("PARAM_MODULE_TYPE", 11);}}// Disable terminal VR panoramic video.mVodPlayer.setStringOption("PARAM_MODULE_TYPE", 0);
// Enable VR panoramic video monocular mode. If you need to enable the binocular mode, set the value to '12'.// Note: The settings for enabling VR panoramic video need to be set before the player starts playing, or if you set them during the playback process, you need to restart the playback after the setting.// It is recommended to add a switch animation here.NSMutableDictionary *extInfoMap = [NSMutableDictionary dictionary];[extInfoMap setObject:@"11" forKey:@"PARAM_MODULE_TYPE"];[_txVodPlayer setExtentOptionInfo:extInfoMap];// Disable terminal VR panoramic video.[extInfoMap setObject:@"0" forKey:@"PARAM_MODULE_TYPE"];
Constant name | Constant Value | Description |
PLAYER_OPTION_PARAM_MODULE_TYPE | "PARAM_MODULE_TYPE" | Module Type. |
PLAYER_OPTION_PARAM_MODULE_CONFIG | "PARAM_MODULE_CONFIG" | Module Configuration. |
PLAYER_OPTION_PARAM_MODULE_VR_ENABLE_SENSOR | "ENABLE_SENSOR" | Enable sensor, default value is true. |
PLAYER_OPTION_PARAM_MODULE_VR_FOV | "FOV" | Field of View (FOV), default value 65.0 degrees, with a valid range between 30.0 and 110.0 degrees. |
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_X | "ANGLE_X" | Horizontal rotation angle, where positive values indicate a rightward turn and negative values denote a leftward turn. 0° represents the forward-facing direction, with a valid range spanning from -180° to 180°. |
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_Y | "ANGLE_Y" | Vertical rotation angle, where positive values indicate upward tilt and negative values indicate downward tilt. A value of 0° represents a horizontal view. The valid range is from -85° to 85°. |
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_RATE | "ANGLE_RATE" | The ratio of gesture sliding distance to angle, where a higher ratio indicates greater sensitivity. The default value is 1/8f. |
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_SLOPE_THRESHOLD | "ANGLE_SLOPE_THRESHOLD" | Rotation XY angle slope threshold, with a default value of 0.5f. Within this threshold range, only the long edges are selected for rotation. |
PLAYER_OPTION_PARAM_MODULE_VR_DO_ROTATE | "MONET_AC_DO_ROTATE" | VR rotation angle. |
Constant name | Constant Value | Description |
PLAYER_OPTION_PARAM_MODULE_TYPE_NONE | 0 | The null type, which disables features such as super-resolution and VR. |
PLAYER_OPTION_PARAM_MODULE_TYPE_SR | 1 | Super-resolution type. |
PLAYER_OPTION_PARAM_MODULE_TYPE_VR_PANORAMA | 11 | VR panoramic model, monocular. |
PLAYER_OPTION_PARAM_MODULE_TYPE_VR_BINOCULAR | 12 | VR panoramic model, binocular. |
Constant name | Constant Value | Description |
PLAYER_OPTION_EVT_ANGLES | 8001 | Rotation angle change event. |
PLAYER_OPTION_EVT_KEY_ANGLE_X | "ANGLE_X" | Horizontal rotation angle, positive values indicate rightward rotation, negative values indicate leftward rotation. |
PLAYER_OPTION_EVT_KEY_ANGLE_Y | "ANGLE_Y" | Vertical rotation angle, with positive values indicating upward rotation and negative values indicating downward rotation. |
Constant name | Constant Value | Constant name | Constant Value | Description |
PLAYER_OPTION_PARAM_MODULE_TYPE | @"PARAM_MODULE_TYPE" | Module Type. | | |
PLAYER_OPTION_PARAM_MODULE_CONFIG | @"PARAM_MODULE_CONFIG" | Module Configuration. | | |
PLAYER_OPTION_PARAM_MODULE_VR_ENABLE_SENSOR | @"ENABLE_SENSOR" | Enable sensor, default value is true. | | |
PLAYER_OPTION_PARAM_MODULE_VR_FOV | @"FOV" | Field of View (FOV), default value 65.0 degrees, with a valid range between 30.0 and 110.0 degrees. | | |
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_X | @"ANGLE_X" | Horizontal rotation angle, where positive values indicate a rightward turn and negative values denote a leftward turn. 0° represents the forward-facing direction, with a valid range spanning from -180° to 180°. | | |
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_Y | @"ANGLE_Y" | Vertical rotation angle, where positive values indicate upward tilt and negative values indicate downward tilt. A value of 0° represents a horizontal view. The valid range is from -85° to 85°. | | |
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_RATE | @"ANGLE_RATE" | The ratio of gesture sliding distance to angle; a higher ratio indicates greater sensitivity, with a default value of 1/3.0f. | | |
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_SLOPE_THRESHOLD | @"ANGLE_SLOPE_THRESHOLD" | Rotation XY angle slope threshold, with a default value of 0.5f. Within this threshold range, only the long edges are selected for rotation. | | |
PLAYER_OPTION_PARAM_MODULE_VR_DO_ROTATE | @"MONET_AC_DO_ROTATE" | VR rotation angle. | | |
Constant name | Constant Value | Description |
PLAYER_OPTION_PARAM_MODULE_TYPE_NONE | 0 | The null type, which disables features such as super-resolution and VR. |
PLAYER_OPTION_PARAM_MODULE_TYPE_SR | 1 | Super-resolution type. |
PLAYER_OPTION_PARAM_MODULE_TYPE_VR_PANORAMA | 11 | VR panoramic model, monocular. |
PLAYER_OPTION_PARAM_MODULE_TYPE_VR_BINOCULAR | 12 | VR panoramic model, binocular. |
Constant name | Constant Value | Description |
PLAYER_OPTION_EVT_ANGLES | 8001 | Rotation angle change event. |
PLAYER_OPTION_EVT_KEY_ANGLE_X | "ANGLE_X" | Horizontal rotation angle, positive values indicate rightward rotation, negative values indicate leftward rotation. |
PLAYER_OPTION_EVT_KEY_ANGLE_Y | "ANGLE_Y" | Vertical rotation angle, with positive values indicating upward rotation and negative values indicating downward rotation. |
TXVodPlayConfig playConfig = new TXVodPlayConfig();playConfig.mEnableRenderProcess = false;mVodPlayer.setConfig(playConfig);
TXVodPlayConfig *playConfig = [[TXVodPlayConfig alloc] init];playConfig.enableRenderProcess = NO;[_txVodPlayer setConfig:playConfig];
-keep class com.tencent.** { *; }
// Create a VR configuration dictionary to store specific VR parametersMap<String, Object> config = new HashMap<>();// Turn off the sensor (gyroscope). Setting it to false means that the viewing angle is not changed by device rotation.config.put(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_VR_ENABLE_SENSOR, false);// Set the field of view to 90 degrees, with a value range of 30.0f-110.0f degrees and a default of 65.0f degrees.config.put(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_VR_FOV, 90.0f);// Set the ratio of gesture swipe distance to angle. The larger the ratio, the higher the sensitivity. The default value is 1/8f.config.put(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_RATE, 0.2f);// Set the XY angle slope threshold for rotation to 0.3 (default value 0.5f). Within this threshold range, only the longer side will be selected for rotation.config.put(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_SLOPE_THRESHOLD,0.3f);// Apply the VR configuration dictionary to the playermVodPlayer.setStringOption(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_CONFIG,config);// Set the VR type to panoramic monocular mode (for binocular mode, use PLAYER_OPTION_PARAM_MODULE_TYPE_VR_BINOCULAR)mVodPlayer.setStringOption(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_TYPE,TXVodConstants.PLAYER_OPTION_PARAM_MODULE_TYPE_VR_PANORAMA);// Start playbackintresult=mVodPlayer.startVodPlay(playUrl);
// Create an extended information dictionary to store VR configurationNSMutableDictionary *extInfoMap = [NSMutableDictionary dictionary];// Set the VR type to panoramic monocular mode (use PLAYER_OPTION_PARAM_MODULE_TYPE_VR_BINOCULAR for binocular mode)[extInfoMap setObject:@(PLAYER_OPTION_PARAM_MODULE_TYPE_VR_PANORAMA)forKey:PLAYER_OPTION_PARAM_MODULE_TYPE];// Create a VR configuration dictionary to store specific VR parametersNSMutableDictionary *vrconfig = [NSMutableDictionary dictionary];// Enable the sensor (gyroscope), setting it to YES indicates that the viewing angle can be changed by rotating the device[vrconfig setObject:@(YES) forKey:PLAYER_OPTION_PARAM_MODULE_VR_ENABLE_SENSOR];// Set the field of view to 110 degrees, with a range of 30.0f-110.0f degrees and a default of 65.0f degrees.[vrconfig setObject:@(110.0f) forKey:PLAYER_OPTION_PARAM_MODULE_VR_FOV];// Set the XY angle slope threshold to 0.3, with a default value of 0.5f. Within this threshold range, only the longer side is selected for rotation.[vrconfig setObject:@(0.3f) forKey:PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_SLOPE_THRESHOLD];// Add the VR configuration dictionary to the extended information dictionary.[extInfoMap setObject:vrconfig forKey:PLAYER_OPTION_PARAM_MODULE_CONFIG];// Apply the extended information to the player to complete the VR configuration.[self.vodPlayer setExtentOptionInfo:extInfoMap];
Map<String, Object> action = new HashMap<>();// Horizontal rotation angle, positive value turns right, negative value turns leftaction.put(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_X, 10.0f);// Vertical rotation angle, positive value turns up, negative value turns downaction.put(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_Y, 10.0f);mVodPlayer.setStringOption(TXVodConstants.PLAYER_OPTION_PARAM_MODULE_VR_DO_ROTATE, action);
NSMutableDictionary *extInfoMap = [NSMutableDictionary dictionary];NSMutableDictionary *action = [NSMutableDictionary dictionary];/// Horizontal rotation angle, positive value rotates right, negative value rotates left[action setObject:@(10.0f) forKey:PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_X];/// Vertical rotation angle, positive value rotates up, negative value rotates down[action setObject:@(10.0f) forKey:PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_Y];[extInfoMap setObject:action forKey:PLAYER_OPTION_PARAM_MODULE_VR_DO_ROTATE];[self.vodPlayer setExtentOptionInfo:extInfoMap];
@Overridepublic void onPlayEvent(TXVodPlayer player, int event, Bundle param) {if (event == TXVodConstants.PLAYER_OPTION_EVT_ANGLES) {if (param != null) {// Get horizontal rotation anglefloat angleX = param.getFloat(TXVodConstants.PLAYER_OPTION_EVT_KEY_ANGLE_X);// Get vertical rotation anglefloat angleY = param.getFloat(TXVodConstants.PLAYER_OPTION_EVT_KEY_ANGLE_Y);}return;}}
-(void) onPlayEvent:(TXVodPlayer *)player event:(int)EvtID withParam:(NSDictionary*)param{if (EvtID == PLAYER_OPTION_EVT_ANGLES) {float angleX = 0;float angleY = 0;// Analyze angle datafor (NSString *key in param) {id value = [param objectForKey:key];if ([key isEqualToString:PLAYER_OPTION_EVT_KEY_ANGLE_X]) {angleX = [value floatValue];} else if ([key isEqualToString:PLAYER_OPTION_EVT_KEY_ANGLE_Y]) {angleY = [value floatValue];}}}}
D/HostEngine-PluginManger: [loadPlugin], succeed loading pluginId=2 ,pluginClazzName=com.tencent.liteav.monet.MonetPlugin
D/MonetPlugin-Process: [updateModule], moduleType=11
E/MonetPlugin-Process: [updateModule], error, reason = license is invalid!!
[PluginsSDK] plugin config : pluginId = 2, pluginName = Monet
[MonetProcessor] PLUGIN: did update monet module, result = 1
[MonetProcessor] Monet License invalid, error, set module is null
Feedback