Is it possible to detect that a flash movie also contains (plays) sound?

Is there a way to determine if a flash movie contains any sound or plays any kind of music?
It would be nice if it could be done inside a web browser (actionscript from another flash object , javascript, ..) and can be done before the flash movie starts playing.

However, I have doubts that this will be possible at all, so any other (programmable) solution is also appreciated

+3
source share
3 answers

Yes, on the server side for sure. Customer side? I dont know. (I am a guy from the server kind).

, / . ( FLV haskel Java , . .)

osflash.org FLV . FLV Format FLV Header.

FIELD       DATA TYPE      EXAMPLE                  DESCRIPTION
 Signature   byte[3]        "FLV"                    Always "FLV"
 Version     uint8          "\x01" (1)               Currently 1 for known FLV files
 Flags       uint8 bitmask  "\x05" (5, audio+video)  Bitmask: 4 is audio, 1 is video
 Offset      uint32-be      "\x00\x00\x00\x09" (9)   Total size of header (always 9 for known FLV files) 

EDIT: Flash , , onMetaDataLoad, . , , , , ?

+3

FLV Flash-, SWF?

, FLV - Flash Video ( ), Flash-// SWF. .

+1

ByteArray , . FLV ( byteArray.readByte() ), , . FLV , .

With SWF, this is a lot of the trick - I'm sure there is no easy way to determine in advance whether swf will play audio anywhere. A way to do this may be to look at what SWF tools have defined in the library, but also swf can just load an external audio file (or even generate it with some hacks or a new apis in Flash Player 10). If the user sent the swf (or something like that out of your direct control), I think this is a dangerous road ..

0
source

Source: https://habr.com/ru/post/1696671/


All Articles