概觀
PlayReady 測試環境提供多個版本設定的伺服器,以支援跨不同 PlayReady 版本和功能集的測試。 每個版本設定的伺服器都會實作特定的 PlayReady 功能和合規性需求,以全面測試客戶端實作。
可用的伺服器版本
PlayReady 1.x 測試伺服器
PlayReady 1.0-1.3 兼容性測試的舊版伺服器:
https://playready-v1.directtaps.net/pr/svc/rightsmanager.asmx
功能:
- 基本授權取得
- 簡單輸出保護
- 舊版 SOAP 通訊協定
- Silverlight 相容性
PlayReady 2.x 測試伺服器
支援 PlayReady 2.0-2.3 功能的伺服器:
https://playready-v2.directtaps.net/pr/svc/rightsmanager.asmx
功能:
- 增強的授權原則
- 網域系結授權
- 安全停止功能
- 硬體型DRM支援
PlayReady 3.x 測試伺服器
具有 PlayReady 3.0+ 功能的新式伺服器:
https://playready-v3.directtaps.net/pr/svc/rightsmanager.asmx
功能:
- 一般加密 (CENC) 支援
- 進階輸出保護層級
- 安全刪除功能
- 增強金鑰輪替
PlayReady 4.x 測試伺服器
支援 PlayReady 4.0+ 功能的最新伺服器:
https://playready-v4.directtaps.net/pr/svc/rightsmanager.asmx
功能:
- SL3000 安全性層級支援
- 進階硬體安全性
- 增強的原則強制執行
- 新式加密標準
Version-Specific 測試
用戶端版本偵測
測試伺服器與不同用戶端版本的相容性:
// Test client version compatibility
async function testClientVersionCompatibility(clientVersion) {
const serverUrl = getServerUrlForVersion(clientVersion);
const response = await testLicenseAcquisition(serverUrl);
return response.success;
}
function getServerUrlForVersion(version) {
const versionMap = {
'1.x': 'https://playready-v1.directtaps.net/pr/svc/rightsmanager.asmx',
'2.x': 'https://playready-v2.directtaps.net/pr/svc/rightsmanager.asmx',
'3.x': 'https://playready-v3.directtaps.net/pr/svc/rightsmanager.asmx',
'4.x': 'https://playready-v4.directtaps.net/pr/svc/rightsmanager.asmx'
};
return versionMap[version];
}
功能相容性矩陣
| 特徵 / 功能 | v1.x | v2.x | v3.x | v4.x |
|---|---|---|---|---|
| 基本授權取得 | ✓ | ✓ | ✓ | ✓ |
| Domain-Bound 授權 | ✗ | ✓ | ✓ | ✓ |
| 安全停止 | ✗ | ✓ | ✓ | ✓ |
| 安全刪除 | ✗ | ✗ | ✓ | ✓ |
| 硬體安全性 | ✗ | 部分的 | ✓ | ✓ |
| 進階 OPL | ✗ | ✗ | ✓ | ✓ |
| SL3000 支援 | ✗ | ✗ | ✗ | ✓ |
Version-Specific 組態
PlayReady 1.x 組態
舊版用戶端的基本授權設定:
<LicenseAcquisition>
<Header>
<DATA>
<PROTECTINFO>
<KEYLEN>16</KEYLEN>
<ALGID>AESCTR</ALGID>
</PROTECTINFO>
<KID>base64-encoded-kid</KID>
<CHECKSUM>base64-encoded-checksum</CHECKSUM>
</DATA>
</Header>
</LicenseAcquisition>
PlayReady 2.x 組態
使用網域支援的增強組態:
{
"version": "2.0",
"licenseType": "persistent",
"keyId": "key-id-guid",
"domainBinding": {
"required": true,
"domainId": "domain-service-id"
},
"outputProtection": {
"digital": "required",
"analog": "copy-never"
}
}
PlayReady 3.x 組態
具有進階功能的新式設定:
{
"version": "3.0",
"licenseType": "persistent",
"keyId": "key-id-guid",
"securityLevel": "SL2000",
"outputProtectionLevels": {
"compressedDigitalVideo": 270,
"uncompressedDigitalVideo": 270,
"analogVideo": 150,
"compressedDigitalAudio": 200,
"uncompressedDigitalAudio": 200
},
"secureStop": {
"required": true,
"serverUrl": "https://securestop.service.com"
}
}
PlayReady 4.x 組態
支援 SL3000 的最新設定:
{
"version": "4.0",
"licenseType": "persistent",
"keyId": "key-id-guid",
"securityLevel": "SL3000",
"hardwareBinding": {
"required": true,
"allowSoftwareFallback": false
},
"outputProtectionLevels": {
"compressedDigitalVideo": 270,
"uncompressedDigitalVideo": 270,
"analogVideo": 100
},
"advancedSecurity": {
"antiRollbackClock": true,
"tamperResistance": "required"
}
}
依版本測試案例
版本相容性測試
每個伺服器版本的測試案例:
PlayReady 1.x 測試
// Basic license acquisition test
async function testPlayReady1x() {
const config = {
serverUrl: 'https://playready-v1.directtaps.net/pr/svc/rightsmanager.asmx',
playRight: 1,
keyId: 'test-key-id'
};
return await testBasicLicenseAcquisition(config);
}
PlayReady 2.x 測試
// Domain-bound license test
async function testPlayReady2x() {
const config = {
serverUrl: 'https://playready-v2.directtaps.net/pr/svc/rightsmanager.asmx',
licenseType: 'persistent',
keyId: 'test-key-id',
domainRequired: true
};
return await testDomainBoundLicense(config);
}
PlayReady 3.x 測試
// Secure stop functionality test
async function testPlayReady3x() {
const config = {
serverUrl: 'https://playready-v3.directtaps.net/pr/svc/rightsmanager.asmx',
licenseType: 'persistent',
keyId: 'test-key-id',
secureStopRequired: true,
securityLevel: 'SL2000'
};
return await testSecureStopFunctionality(config);
}
PlayReady 4.x 測試
// Hardware security test
async function testPlayReady4x() {
const config = {
serverUrl: 'https://playready-v4.directtaps.net/pr/svc/rightsmanager.asmx',
licenseType: 'persistent',
keyId: 'test-key-id',
securityLevel: 'SL3000',
hardwareBindingRequired: true
};
return await testHardwareSecurity(config);
}
伺服器選取策略
自動版本偵測
async function selectOptimalServer(clientCapabilities) {
// Check client PlayReady version
const clientVersion = clientCapabilities.playreadyVersion;
// Select compatible server version
if (clientVersion >= '4.0') {
return 'https://playready-v4.directtaps.net/pr/svc/rightsmanager.asmx';
} else if (clientVersion >= '3.0') {
return 'https://playready-v3.directtaps.net/pr/svc/rightsmanager.asmx';
} else if (clientVersion >= '2.0') {
return 'https://playready-v2.directtaps.net/pr/svc/rightsmanager.asmx';
} else {
return 'https://playready-v1.directtaps.net/pr/svc/rightsmanager.asmx';
}
}
Feature-Based 選取範圍
function selectServerByFeatures(requiredFeatures) {
const serverCapabilities = {
'v4': ['basic', 'domain', 'secureStop', 'secureDelete', 'sl3000'],
'v3': ['basic', 'domain', 'secureStop', 'secureDelete', 'sl2000'],
'v2': ['basic', 'domain', 'secureStop'],
'v1': ['basic']
};
// Find minimum server version that supports all required features
for (const [version, features] of Object.entries(serverCapabilities).reverse()) {
if (requiredFeatures.every(feature => features.includes(feature))) {
return `https://playready-${version}.directtaps.net/pr/svc/rightsmanager.asmx`;
}
}
throw new Error('No compatible server version found');
}
移轉測試
跨版本相容性
跨不同伺服器版本測試授權相容性:
async function testCrossVersionCompatibility() {
const keyId = 'test-key-12345';
const results = {};
// Test each server version
for (const version of ['v1', 'v2', 'v3', 'v4']) {
try {
const serverUrl = `https://playready-${version}.directtaps.net/pr/svc/rightsmanager.asmx`;
results[version] = await testLicenseAcquisition(serverUrl, keyId);
} catch (error) {
results[version] = { success: false, error: error.message };
}
}
return results;
}
升級路徑測試
測試客戶端升級案例:
async function testUpgradePath(fromVersion, toVersion) {
// Get license from old server
const oldServerUrl = `https://playready-${fromVersion}.directtaps.net/pr/svc/rightsmanager.asmx`;
const oldLicense = await acquireLicense(oldServerUrl);
// Test license compatibility with new server
const newServerUrl = `https://playready-${toVersion}.directtaps.net/pr/svc/rightsmanager.asmx`;
return await validateLicenseCompatibility(newServerUrl, oldLicense);
}
最佳做法
伺服器選取指導方針
- 比對用戶端版本:使用符合或與用戶端相容的伺服器版本
- 功能需求:根據必要的DRM功能選取
- 安全性層級:為內容選擇適當的安全性層級
- 回溯兼容性:使用舊版伺服器進行測試以取得相容性
測試建議
- 版本矩陣測試:測試所有客戶端-伺服器版本組合
- 功能隔離:在適當的伺服器版本上測試個別功能
- 移轉案例:測試升級和降級路徑
- 錯誤處理:測試版本不符的錯誤案例
監視和診斷
伺服器健康情況檢查
async function checkServerHealth(version) {
const serverUrl = `https://playready-${version}.directtaps.net/pr/svc/rightsmanager.asmx`;
try {
const response = await fetch(`${serverUrl}?health`);
return {
version: version,
status: response.ok ? 'healthy' : 'unhealthy',
responseTime: response.headers.get('x-response-time')
};
} catch (error) {
return {
version: version,
status: 'error',
error: error.message
};
}
}
相關文件
- PlayReady Test Server 服務 - 主要服務概觀
- 如何測試 Client-Server 版本 - 版本測試指引
- 如何移轉 - 移轉指引
- PlayReady 測試伺服器 - 完整伺服器檔
支援和疑難解答
針對版本設定的伺服器問題:
- 確認客戶端-伺服器版本相容性
- 檢查功能支援矩陣
- 使用適當的伺服器版本進行測試
- 檢閱版本特定的設定需求
- 驗證安全性層級需求
如需其他支援,請參閱主要的 PlayReady 測試伺服器 檔。