AR/getSoundMetaTags: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
Used to get the meta tags attached to a sound. These provide information about the sound, for instance the title or the artist.
تستخدم للحصول على العلامات الوصفية المرفقة بصوت. توفر هذه المعلومات حول الصوت ، على سبيل المثال العنوان أو الفنان.


==Syntax==  
==تركيب الوظيفة==  
<syntaxhighlight lang="lua">table getSoundMetaTags ( element sound )</syntaxhighlight>  
<syntaxhighlight lang="lua">table getSoundMetaTags ( element sound )</syntaxhighlight>  


===Required Arguments===  
===الفرغات المطلوبة===  
*'''sound:''' a [[sound]] element.
*'''الصوت:''' عنصر الصوت.
 
[[sound]]
===Returns===
===المعطيات===
Returns a [[table]] with all data available (keys are listed below) for the sound if successful, ''false'' otherwise.
* تعطي جدول بكل المعلومات المتاحة للصوت اذا نجحت
 
[[table]]
* تعطي false اذا لم تنجح
{{Sound_Meta_Tags}}
{{Sound_Meta_Tags}}


==Example==  
==مثال==  
<syntaxhighlight lang="lua">addEventHandler("onClientSoundFinishedDownload",root,function(length)
<syntaxhighlight lang="lua">addEventHandler("onClientSoundFinishedDownload",root,function(length)
local meta = getSoundMetaTags(source)
local meta = getSoundMetaTags(source)
outputChatBox("The sound: "..(meta.title).." has finished in :"..length.."ms.")
outputChatBox("الصوت: "..(meta.title).." تم تنزيلة في :"..length.."ثانية.")
         outputChatBox("The sound meta tags: Artist:"..(meta.artist).." Album:"..(meta.album).." Genre:"..(meta.genre).." Year:"..(meta.year).." Comment:"..(meta.comment).." Track:"..(meta.track).." Composer:"..(meta.composer).." Copyright:"..(meta.copyright).." SubTitle:"..(meta.subtitle).." Album Artist:"..(meta.album_artist)..".")
         outputChatBox("العلامات الوصفية للصوت: الفنان:"..(meta.artist).." الألبوم:"..(meta.album).." النوع:"..(meta.genre).." السنة:"..(meta.year).." تعليق:"..(meta.comment).." مقطوعة:"..(meta.track).." ملحن:"..(meta.composer).." حقوق النشر:"..(meta.copyright).." العنوان الفرعي:"..(meta.subtitle).." فنان الألبوم:"..(meta.album_artist)..".")
end)
end)
</syntaxhighlight>
</syntaxhighlight>

Revision as of 08:39, 10 May 2020

تستخدم للحصول على العلامات الوصفية المرفقة بصوت. توفر هذه المعلومات حول الصوت ، على سبيل المثال العنوان أو الفنان.

تركيب الوظيفة

table getSoundMetaTags ( element sound )

الفرغات المطلوبة

  • الصوت: عنصر الصوت.

sound

المعطيات

  • تعطي جدول بكل المعلومات المتاحة للصوت اذا نجحت

table

  • تعطي false اذا لم تنجح
  • title
  • artist
  • album
  • genre
  • year
  • comment
  • track
  • composer
  • copyright
  • subtitle
  • album_artist
  • stream_name
  • stream_title

مثال

addEventHandler("onClientSoundFinishedDownload",root,function(length)
	local meta = getSoundMetaTags(source)
	outputChatBox("الصوت: "..(meta.title).." تم تنزيلة في :"..length.."ثانية.")
        outputChatBox("العلامات الوصفية للصوت: الفنان:"..(meta.artist).." الألبوم:"..(meta.album).." النوع:"..(meta.genre).." السنة:"..(meta.year).." تعليق:"..(meta.comment).." مقطوعة:"..(meta.track).." ملحن:"..(meta.composer).." حقوق النشر:"..(meta.copyright).." العنوان الفرعي:"..(meta.subtitle).." فنان الألبوم:"..(meta.album_artist)..".")
end)

أنظر أيضاً