 
       @__recorder.onstop = =>
         blob = new Blob(@__chunks, {'type': @__recorder.mimeType})
-        blob.name = "record.webm"
+        ext = @__guessExtensionByMime(@__recorder.mimeType)
+        blob.name = "record.#{ext}"
         @dialogApi.addFiles('object', [[blob, {source: 'camera'}]])
         @dialogApi.switchTab('preview')
         @__chunks = []

      if @settings.videoBitsPerSecond != null
        __recorderOptions.videoBitsPerSecond = @settings.videoBitsPerSecond

      @__recorder = new @MediaRecorder(@__stream, __recorderOptions)

      @__recorder.start()
      @__recorder.ondataavailable = (e) =>

      @__setState('recording')

      @__chunks = []
      __recorderOptions = {}

      if @settings.audioBitsPerSecond != null
        __recorderOptions.audioBitsPerSecond = @settings.audioBitsPerSecond
