音樂播放清單的內容標記屬性

本節將說明 MusicPlaylist 實體類型的內容標記屬性詳細資料。

規格表

屬性 預期類型 說明
@context Text 必填 - 一律設為 ["http://schema.googleapis.com", {"@language": "xx"}]
  • 其中「xx」代表動態饋給中的字串語言。每個根實體內容都應將 @language 設為適當的語言代碼,格式為 BCP 47 格式。舉例來說,如果語言設為西班牙文,系統會假設名稱為西班牙文,即使字幕/配音語言為英文也一樣。
@type Text 必填 - 請一律將此屬性設為 MusicPlaylist,以便混合。
@id 網址 必填:內容的 ID,格式為 URI,例如 https://example.com/1234abc
@id 必須符合下列規定:
  • 在目錄中全域專屬
  • 靜態;這個 ID 應固定,不會隨著時間而改變 (即使節目的網址屬性有所變更)。系統會將這個值視為不透明字串,且不一定要是有效連結。
  • 統一資源識別碼 (URI) 格式
  • 用於 @id 值的網域必須由貴機構所擁有。
由於實體的 url 符合 ID 的所有必要條件,建議您將實體的 url 做為 @id。詳情請參閱「識別碼」一節。
url 網址 必填:內容的標準網址,Google 會使用這項資訊,將動態饋給中的內容與 Google 資料庫中的內容進行比對。
url 必須符合下列規定:
  • url 須為全域唯一值
  • url 必須包含 Google 可檢索的有效標準網址。
  • url 必須指向未受付費牆阻擋的內容說明頁面。
如要取得播放內容的深層連結,請改為參閱 target 物件的 urlTemplate 屬性。
name Text 必要:播放清單名稱,例如「Funky Jazz Mix」。
genre Text 如果播放清單是混合類型:播放清單所代表的類型專屬關鍵字清單。這項屬性會向 Google 表明你想將這個播放清單設為類型播放清單。
numTracks 整數 如果播放清單是精選混音帶,則為必填欄位:播放清單中的曲目數量。這個屬性出現時,Google 就會知道這個播放清單是手動精選的。如果沒有這項資源,就表示播放清單是無限自動產生的播放清單。
potentialAction ListenAction 必要:提供動作詳細資料的動作標記物件。詳情請參閱動作標記屬性
image ImageObject 代表播放清單或音樂合輯的圖片。請參閱「圖片標記屬性」。
creator 機構個人 如果創作者的內容很受歡迎,建議使用這個選項。使用這個屬性,指出由貴服務建立的播放清單 (類型為 Organization,其 name 屬性會指出貴服務),或貴服務的熱門使用者 (類型為 Person,其 name 屬性會指出熱門使用者)。
keywords Text 關鍵字清單 (「搖滾」、「流行」)、情境 (「快樂」、「心情不好」)、活動 (「運動」、「放鬆」) 或與播放清單相關的其他字詞。
description Text 簡短的播放清單說明。長度上限為 300 個半形字元
isFamilyFriendly 布林值 表示內容是否闔家觀賞 (也就是內容適合所有家庭成員,包括兒童)。Google 產品在決定要播放哪首歌曲時,可能會使用 isFamilyFriendly
popularityScore PopularityScoreSpecification 強烈建議Google 會使用這個分數,搭配其他信號,判斷要為使用者播放哪些媒體。這個分數代表內容相對於目錄中其他內容的熱門程度,因此分數的評分標準必須在目錄中的所有實體和動態消息中保持一致。實體的熱門程度分數預設為 0。
popularityScore.@type Text 一律設為 PopularityScoreSpecification
popularityScore.value Number 非負數值,表示實體的熱門程度;分數越高,代表熱門程度越高。
popularityScore.eligibleRegion 國家/地區 這個熱門程度分數適用的區域。如果人氣分數適用於全球,請將其設為 EARTH。根據預設,此屬性會設為 EARTH
Note: 當地熱門程度優先於全球 (EARTH) 熱門程度

範例

以下範例包含 2010 年代流行歌曲的精選播放清單:

{
  "@context":["http://schema.googleapis.com/", {"@language": "en"}],
  "@type":"MusicPlaylist",
  "@id":"http://www.example.com/playlist/top-pop-songs/",
  "url":"http://www.example.com/playlist/top-pop-songs/",
  "name":"Top Pop Songs of the 2010s",
  "image":[
  {
    "@type": "ImageObject",
    "contentUrl" : "http://www.example.com/playlist/top-pop-songs/1x1/photo1.jpg",
    "dateModified" : "2018-01-05T22:11:33+00:00",
    "regionsAllowed" : ["US","UK","MX"]
  },
  {
    "@type": "ImageObject",
    "contentUrl" : "http://www.example.com/playlist/top-pop-songs/1x1/photo2.jpg",
    "dateModified" : "2018-01-05T22:11:33+00:00",
    "regionsAllowed" : ["UA", "IR"]
  }],
  "genre": [
     "pop",
     "2010s"
  ],
  "numTracks":"46",
  "potentialAction":{
    "@type":"ListenAction",
    "target":[
      {
        "@type":"EntryPoint",
        "urlTemplate":"http://www.example.com/playlist/top-pop-songs?autoplay=true",
        "actionPlatform":[
          "http://schema.org/DesktopWebPlatform",
          "http://schema.org/IOSPlatform",
          "http://schema.org/AndroidPlatform",
          "http://schema.org/AndroidTVPlatform",
          "http://schema.googleapis.com/GoogleAudioCast",
          "http://schema.googleapis.com/GoogleVideoCast"
        ]
      },
      {
        "@type": "EntryPoint",
        "urlTemplate": "android-app://com.app.example/playlist/top-pop-songs?autoplay=true",
        "actionPlatform": "http://schema.org/AndroidPlatform"
      }
    ],
    "expectsAcceptanceOf":{
      "@type":"Offer",
      "category":"free",
      "eligibleRegion": {
        "@type":"Country",
        "name":"US"
      }
    }
  },
  "creator": {
    "@type": "Organization",
    "name": "example.com"
  },
  "keywords": [
    "pop",
    "Party music"
  ],
  "popularityScore": {
    "@type": "PopularityScoreSpecification",
    "value": 78,
    "eligibleRegion": [
      {
        "@type": "Country",
        "name": "US"
      },
      {
        "@type": "Country",
        "name": "CA"
      }
    ]
  },
  "description":"Top pop songs from the last decade."
}

如要瞭解這些資源的相關主題,請參閱下列頁面: