Adding media permission script